1
0
Bläddra i källkod

Merge branch 'master' into debugger

Conflicts:
	js/Compiler-Semantic.deploy.js
	js/Compiler-Semantic.js
	js/Helios-Browser.js
	js/Helios-Core.deploy.js
	js/Helios-Core.js
	js/Helios-Inspector.js
	js/Helios-KeyBindings.deploy.js
	js/Helios-KeyBindings.js
	js/Helios-References.js
	js/Helios-Workspace.deploy.js
	js/Helios-Workspace.js
	js/IDE.deploy.js
	js/IDE.js
	js/Importer-Exporter.deploy.js
	js/Importer-Exporter.js
	js/Kernel-Objects.deploy.js
	js/Kernel-Objects.js
	js/Spaces.deploy.js
	js/Spaces.js
	support/boot.js
Nicolas Petton 11 år sedan
förälder
incheckning
cecce808a7
100 ändrade filer med 9614 tillägg och 10960 borttagningar
  1. 3 0
      .gitignore
  2. 14 6
      Gruntfile.js
  3. 26 19
      bin/amberc.js
  4. 12 0
      bower.json
  5. 1 1
      cli/index.html
  6. 1 1
      css/helios.css
  7. 6 6
      helios.html
  8. 1 1
      index.html
  9. 1 1
      js/Benchfib.deploy.js
  10. 1 1
      js/Benchfib.js
  11. 71 4
      js/Canvas.deploy.js
  12. 98 5
      js/Canvas.js
  13. 1 1
      js/Compiler-AST.deploy.js
  14. 1 1
      js/Compiler-AST.js
  15. 1 1
      js/Compiler-Core.deploy.js
  16. 1 1
      js/Compiler-Core.js
  17. 1 1
      js/Compiler-Exceptions.deploy.js
  18. 1 1
      js/Compiler-Exceptions.js
  19. 1 1
      js/Compiler-IR.deploy.js
  20. 1 1
      js/Compiler-IR.js
  21. 1 1
      js/Compiler-Inlining.deploy.js
  22. 1 1
      js/Compiler-Inlining.js
  23. 1 1
      js/Compiler-Semantic.deploy.js
  24. 1 1
      js/Compiler-Semantic.js
  25. 1 1
      js/Compiler-Tests.deploy.js
  26. 1 1
      js/Compiler-Tests.js
  27. 1 1
      js/Examples.deploy.js
  28. 1 1
      js/Examples.js
  29. 1 1
      js/Helios-Announcements.deploy.js
  30. 1 1
      js/Helios-Announcements.js
  31. 1 1
      js/Helios-Browser.deploy.js
  32. 3 3
      js/Helios-Browser.js
  33. 1 1
      js/Helios-Commands-Browser.deploy.js
  34. 1 1
      js/Helios-Commands-Browser.js
  35. 1 1
      js/Helios-Commands-Core.deploy.js
  36. 2 2
      js/Helios-Commands-Core.js
  37. 1 1
      js/Helios-Commands-Tools.deploy.js
  38. 1 1
      js/Helios-Commands-Tools.js
  39. 0 1000
      js/Helios-Commands.deploy.js
  40. 0 1360
      js/Helios-Commands.js
  41. 25 36
      js/Helios-Core.deploy.js
  42. 38 54
      js/Helios-Core.js
  43. 1 1
      js/Helios-Debugger.deploy.js
  44. 1 1
      js/Helios-Debugger.js
  45. 1 1
      js/Helios-Exceptions.deploy.js
  46. 1 1
      js/Helios-Exceptions.js
  47. 1 1
      js/Helios-Inspector.deploy.js
  48. 13 13
      js/Helios-Inspector.js
  49. 6 6
      js/Helios-KeyBindings.deploy.js
  50. 9 9
      js/Helios-KeyBindings.js
  51. 1 1
      js/Helios-Layout.deploy.js
  52. 1 1
      js/Helios-Layout.js
  53. 1 1
      js/Helios-References.deploy.js
  54. 2 2
      js/Helios-References.js
  55. 1 1
      js/Helios-Transcript.deploy.js
  56. 1 1
      js/Helios-Transcript.js
  57. 1 1
      js/Helios-Workspace-Tests.deploy.js
  58. 1 1
      js/Helios-Workspace-Tests.js
  59. 4 4
      js/Helios-Workspace.deploy.js
  60. 6 6
      js/Helios-Workspace.js
  61. 29 31
      js/IDE.deploy.js
  62. 45 47
      js/IDE.js
  63. 419 400
      js/Importer-Exporter.deploy.js
  64. 425 471
      js/Importer-Exporter.js
  65. 1 1
      js/Kernel-Announcements.deploy.js
  66. 1 1
      js/Kernel-Announcements.js
  67. 2 5
      js/Kernel-Classes.deploy.js
  68. 3 6
      js/Kernel-Classes.js
  69. 1 1
      js/Kernel-Collections.deploy.js
  70. 1 1
      js/Kernel-Collections.js
  71. 1 1
      js/Kernel-Exceptions.deploy.js
  72. 1 1
      js/Kernel-Exceptions.js
  73. 1736 0
      js/Kernel-Infrastructure.deploy.js
  74. 2307 0
      js/Kernel-Infrastructure.js
  75. 62 7
      js/Kernel-Methods.deploy.js
  76. 85 9
      js/Kernel-Methods.js
  77. 506 2197
      js/Kernel-Objects.deploy.js
  78. 721 2987
      js/Kernel-Objects.js
  79. 497 192
      js/Kernel-Tests.deploy.js
  80. 732 327
      js/Kernel-Tests.js
  81. 1 1
      js/Kernel-Transcript.deploy.js
  82. 1 1
      js/Kernel-Transcript.js
  83. 1 1
      js/SUnit-Tests.deploy.js
  84. 1 1
      js/SUnit-Tests.js
  85. 1 1
      js/SUnit.deploy.js
  86. 1 1
      js/SUnit.js
  87. 8 8
      js/Spaces.deploy.js
  88. 11 11
      js/Spaces.js
  89. 1 1
      package.json
  90. 46 2
      st/Canvas.st
  91. 0 490
      st/Helios-Commands.st
  92. 15 19
      st/Helios-Core.st
  93. 3 3
      st/Helios-KeyBindings.st
  94. 2 2
      st/Helios-Workspace.st
  95. 24 22
      st/IDE.st
  96. 584 251
      st/Importer-Exporter.st
  97. 1 4
      st/Kernel-Classes.st
  98. 922 0
      st/Kernel-Infrastructure.st
  99. 37 5
      st/Kernel-Methods.st
  100. 0 875
      st/Kernel-Objects.st

+ 3 - 0
.gitignore

@@ -16,3 +16,6 @@ test/run.js
 
 # Ignoring local NPM modules
 /node_modules/*
+
+# Ignoring local bower modules
+/bower_components/*

+ 14 - 6
Gruntfile.js

@@ -22,8 +22,8 @@ module.exports = function(grunt) {
           cache: true,
           export_var: 'smalltalk.parser'
         },
-        src: 'js/parser.pegjs',
-        dest: 'js/parser.js',
+        src: 'support/parser.pegjs',
+        dest: 'support/parser.js',
       }
     },
 
@@ -39,8 +39,16 @@ module.exports = function(grunt) {
               'st/Importer-Exporter.st', 'st/Compiler-Exceptions.st', 'st/Compiler-Core.st', 'st/Compiler-AST.st',
               'st/Compiler-IR.st', 'st/Compiler-Inlining.st', 'st/Compiler-Semantic.st',
               'st/Canvas.st', 'st/SUnit.st', 'st/IDE.st',
-              'st/Kernel-Tests.st', 'st/Compiler-Tests.st', 'st/SUnit-Tests.st'
+              'st/Kernel-Tests.st', 'st/Compiler-Tests.st', 'st/SUnit-Tests.st',
+              'st/Helios-Core.st', 'st/Helios-Exceptions.st', 'st/Helios-Announcements.st',
+              'st/Helios-KeyBindings.st', 'st/Helios-Layout.st',
+              'st/Helios-Commands-Core.st', 'st/Helios-Commands-Tools.st', 'st/Helios-Commands-Browser.st',
+              'st/Helios-References.st', 'st/Helios-Inspector.st', 'st/Helios-Browser.st',
+              'st/Helios-Transcript.st', 'st/Helios-Workspace.st', 'st/Helios-Debugger.st',
+              'st/Helios-Workspace-Tests.st',
+              'st/Benchfib.st', 'st/Examples.st', 'st/Spaces.st'
               ],
+        jsGlobals: ['navigator'],
         deploy: true
       },
       amber_kernel: {
@@ -76,8 +84,8 @@ module.exports = function(grunt) {
         src: ['test/Test.st'],
         libraries: [
         'Compiler-Exceptions', 'Compiler-Core', 'Compiler-AST',
-        'Compiler-IR', 'Compiler-Inlining', 'Compiler-Semantic', 'Compiler-Interpreter', 'parser',
-        'SUnit',
+        'Compiler-IR', 'Compiler-Inlining', 'Compiler-Semantic', 'Compiler-Interpreter', '@parser',
+        'SUnit', 'Importer-Exporter',
         'Kernel-Tests', 'Compiler-Tests', 'SUnit-Tests'],
         output_name: 'test/amber_test_runner'
       },
@@ -94,7 +102,7 @@ module.exports = function(grunt) {
         src: ['cli/st/AmberCli.st'],
         libraries: [
             'Compiler-Exceptions', 'Compiler-Core', 'Compiler-AST',
-            'Compiler-IR', 'Compiler-Inlining', 'Compiler-Semantic', 'Compiler-Interpreter', 'parser'
+            'Compiler-IR', 'Compiler-Inlining', 'Compiler-Semantic', 'Compiler-Interpreter', '@parser'
         ],
         main_class: 'AmberCli',
         output_name: 'amber-cli'

+ 26 - 19
bin/amberc.js

@@ -54,19 +54,19 @@ function Combo(callback) {
 
 Combo.prototype = {
   add: function () {
-    var self = this,
-        id = this.items;
-    this.items++;
-    return function () {
-      self.check(id, arguments);
-    };
+	var self = this,
+		id = this.items;
+	this.items++;
+	return function () {
+	  self.check(id, arguments);
+	};
   },
   check: function (id, arguments) {
-    this.results[id] = Array.prototype.slice.call(arguments);
-    this.items--;
-    if (this.items == 0) {
-      this.callback.apply(this, this.results);
-    }
+	this.results[id] = Array.prototype.slice.call(arguments);
+	this.items--;
+	if (this.items == 0) {
+	  this.callback.apply(this, this.results);
+	}
   }
 };
 
@@ -83,11 +83,11 @@ var path = require('path'),
 function AmberC(amber_dir, closure_jar) {
 	this.amber_dir = amber_dir;
 	this.closure_jar = closure_jar || '';
-	this.kernel_libraries = ['boot', 'Kernel-Objects', 'Kernel-Classes', 'Kernel-Methods',
-	                         'Kernel-Collections', 'Kernel-Exceptions', 'Kernel-Transcript',
+	this.kernel_libraries = ['@boot', 'Kernel-Objects', 'Kernel-Classes', 'Kernel-Methods',
+	                         'Kernel-Collections', 'Kernel-Infrastructure', 'Kernel-Exceptions', 'Kernel-Transcript',
 	                         'Kernel-Announcements'];
-	this.compiler_libraries = this.kernel_libraries.concat(['parser', 'Importer-Exporter', 'Compiler-Exceptions',
-	                          'Compiler-Core', 'Compiler-AST', 'Compiler-IR', 'Compiler-Inlining', 'Compiler-Semantic']);
+	this.compiler_libraries = this.kernel_libraries.concat(['@parser', 'Importer-Exporter', 'Compiler-Exceptions',
+							  'Compiler-Core', 'Compiler-AST', 'Compiler-IR', 'Compiler-Inlining', 'Compiler-Semantic']);
 }
 
 
@@ -101,7 +101,7 @@ var createDefaults = function(amber_dir, finished_callback){
 
 	return {
 		'load': [],
-		'init': path.join(amber_dir, 'js', 'init.js'),
+		'init': path.join(amber_dir, 'support', 'init.js'),
 		'main': undefined,
 		'mainfile': undefined,
 		'stFiles': [],
@@ -224,9 +224,11 @@ AmberC.prototype.check_for_closure_compiler = function(callback) {
  * @param callback gets called on success with path to .js file as parameter
  */
 AmberC.prototype.resolve_js = function(filename, callback) {
+    var special = filename[0] == "@";
+    if (special) { filename = filename.slice(1); }
 	var baseName = path.basename(filename, '.js');
 	var jsFile = baseName + this.defaults.loadsuffix + '.js';
-	var amberJsFile = path.join(this.amber_dir, 'js', jsFile);
+	var amberJsFile = path.join(this.amber_dir, special?'support':'js', jsFile);
 	console.log('Resolving: ' + jsFile);
 	fs.exists(jsFile, function(exists) {
 		if (exists) {
@@ -495,9 +497,14 @@ AmberC.prototype.category_export = function() {
 		console.log('Exporting ' + (defaults.deploy ? '(debug + deploy)' : '(debug)')
 			+ ' category ' + category + ' as ' + jsFile
 			+ (defaults.deploy ? ' and ' + jsFileDeploy : ''));
-		fs.writeFile(jsFile, defaults.smalltalk.Exporter._new()._exportPackage_(category), function(err) {
+		var smalltalk = defaults.smalltalk;
+		var pluggableExporter = smalltalk.PluggableExporter;
+		var packageObject = smalltalk.Package._named_(category);
+		fs.writeFile(jsFile, smalltalk.String._streamContents_(function (stream) {
+			pluggableExporter._forRecipe_(smalltalk.Exporter._default()._recipe())._exportPackage_on_(packageObject, stream); }), function(err) {
 			if (defaults.deploy) {
-				fs.writeFile(jsFileDeploy, defaults.smalltalk.StrippedExporter._new()._exportPackage_(category), callback);
+				fs.writeFile(jsFileDeploy, smalltalk.String._streamContents_(function (stream) {
+					pluggableExporter._forRecipe_(smalltalk.StrippedExporter._default()._recipe())._exportPackage_on_(packageObject, stream); }), callback);
 			} else {
 				callback(null, null);
 			}

+ 12 - 0
bower.json

@@ -0,0 +1,12 @@
+{
+  "name": "amber",
+  "version": "0.11.0",
+  "main": "support/amber.js",
+  "ignore": [
+    "**/.*",
+    "node_modules",
+    "bower_components",
+    "test",
+    "tests"
+  ]
+}

+ 1 - 1
cli/index.html

@@ -5,7 +5,7 @@
     <title>Amber Smalltalk</title> 
     <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 
     <meta name="author" content="Nicolas Petton" /> 
-    <script type='text/javascript' src='../js/amber.js'></script> 
+    <script type='text/javascript' src='../support/amber.js'></script>
   </head> 
 
   <body> 

+ 1 - 1
css/helios.css

@@ -35,7 +35,7 @@ html[xmlns] .clearfix {
   overflow: hidden;
   height: 100%;
   width: 100%;
-  background: #fff;
+  /*background: #fff*/;
 }
 #helios .CodeMirror-hints {
   border-radius: 0;

+ 6 - 6
helios.html

@@ -4,7 +4,7 @@
     <title>Helios IDE</title>
     <meta http-equiv="content-type" content="text/html; charset=utf-8" />
     <meta name="author" content="Nicolas Petton" />
-    <link rel="stylesheet" type="text/css" href='js/lib/bootstrap/css/bootstrap.css' />
+    <link rel="stylesheet" type="text/css" href='support/bootstrap/css/bootstrap.css' />
     <link type="image/x-icon" rel="shortcut icon" href="/favicon.ico"/>
     <link rel="stylesheet" type="text/css" href='css/helios.css' />
   </head>
@@ -12,11 +12,11 @@
     <div id="helper">Loading Helios...</div>
 
     <div id="includes">
-      <script type='text/javascript' src='js/lib/jQuery/jquery-1.8.2.min.js'></script>
-      <script type='text/javascript' src='js/lib/jQuery/jquery-ui-1.8.24.custom.min.js'></script>
-      <script type='text/javascript' src='js/lib/bootstrap/js/bootstrap.js'></script>
-      <script type='text/javascript' src='js/lib/showdown.js'></script>
-      <script type='text/javascript' src='js/amber.js'></script>
+      <script type='text/javascript' src='support/jQuery/jquery-1.8.2.min.js'></script>
+      <script type='text/javascript' src='support/jQuery/jquery-ui-1.8.24.custom.min.js'></script>
+      <script type='text/javascript' src='support/bootstrap/js/bootstrap.js'></script>
+      <script type='text/javascript' src='support/showdown/showdown.js'></script>
+      <script type='text/javascript' src='support/amber.js'></script>
       <script type='text/javascript'>
         loadAmber({packages: [
           'Spaces', 'Helios-Core', 'Helios-Exceptions', 'Helios-Commands-Core',

+ 1 - 1
index.html

@@ -5,7 +5,7 @@
     <title>Amber Smalltalk</title> 
     <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 
     <meta name="author" content="Nicolas Petton" /> 
-    <script type='text/javascript' src='js/amber.js'></script> 
+    <script type='text/javascript' src='support/amber.js'></script>
   </head> 
 
   <body> 

+ 1 - 1
js/Benchfib.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Benchfib');
+
 smalltalk.addClass('Benchfib', smalltalk.Object, [], 'Benchfib');
 
 smalltalk.addMethod(
@@ -15,7 +16,6 @@ return self}, function($ctx1) {$ctx1.fill(self,"main",{result:result},smalltalk.
 messageSends: ["tinyBenchmarks", "log:", ","]}),
 smalltalk.Benchfib.klass);
 
-
 smalltalk.addMethod(
 smalltalk.method({
 selector: "benchFib",

+ 1 - 1
js/Benchfib.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Benchfib');
+
 smalltalk.addClass('Benchfib', smalltalk.Object, [], 'Benchfib');
 
 smalltalk.addMethod(
@@ -20,7 +21,6 @@ referencedClasses: []
 }),
 smalltalk.Benchfib.klass);
 
-
 smalltalk.addMethod(
 smalltalk.method({
 selector: "benchFib",

+ 71 - 4
js/Canvas.deploy.js

@@ -1,5 +1,73 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Canvas');
+
+smalltalk.addClass('BrowserInterface', smalltalk.Object, [], 'Canvas');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "ajax:",
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(jQuery)._ajax_(anObject);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"ajax:",{anObject:anObject},smalltalk.BrowserInterface)})},
+messageSends: ["ajax:"]}),
+smalltalk.BrowserInterface);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "alert:",
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(window)._alert_(aString);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},smalltalk.BrowserInterface)})},
+messageSends: ["alert:"]}),
+smalltalk.BrowserInterface);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "confirm:",
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(window)._confirm_(aString);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"confirm:",{aString:aString},smalltalk.BrowserInterface)})},
+messageSends: ["confirm:"]}),
+smalltalk.BrowserInterface);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "isAvailable",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return typeof window !== "undefined" && typeof jQuery !== "undefined";
+return self}, function($ctx1) {$ctx1.fill(self,"isAvailable",{},smalltalk.BrowserInterface)})},
+messageSends: []}),
+smalltalk.BrowserInterface);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "prompt:",
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(window)._prompt_(aString);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"prompt:",{aString:aString},smalltalk.BrowserInterface)})},
+messageSends: ["prompt:"]}),
+smalltalk.BrowserInterface);
+
+
+smalltalk.BrowserInterface.klass.iVarNames = ['uiWorker','ajaxWorker'];
+
 smalltalk.addClass('HTMLCanvas', smalltalk.Object, ['root'], 'Canvas');
 smalltalk.addMethod(
 smalltalk.method({
@@ -1909,10 +1977,10 @@ fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-$1=_st(window)._jQuery_(self._element());
+$1=_st(self._element())._asJQuery();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asJQuery",{},smalltalk.TagBrush)})},
-messageSends: ["jQuery:", "element"]}),
+messageSends: ["asJQuery", "element"]}),
 smalltalk.TagBrush);
 
 smalltalk.addMethod(
@@ -2609,7 +2677,7 @@ messageSends: ["initializeFromString:canvas:", "new", "yourself"]}),
 smalltalk.StyleTag.klass);
 
 
-smalltalk.addClass('Widget', smalltalk.Object, [], 'Canvas');
+smalltalk.addClass('Widget', smalltalk.InterfacingObject, [], 'Canvas');
 smalltalk.addMethod(
 smalltalk.method({
 selector: "appendToBrush:",
@@ -2655,7 +2723,6 @@ return "widget";
 messageSends: []}),
 smalltalk.Widget.klass);
 
-
 smalltalk.addMethod(
 smalltalk.method({
 selector: "appendToBrush:",

+ 98 - 5
js/Canvas.js

@@ -1,5 +1,99 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Canvas');
+
+smalltalk.addClass('BrowserInterface', smalltalk.Object, [], 'Canvas');
+smalltalk.BrowserInterface.comment="I am platform interface class that tries to use window and jQuery; that is, one for browser environment.\x0a\x0a## API\x0a\x0a    self isAvailable. \x22true if window and jQuery exist\x22.\x0a\x0a    self alert: 'Hey, there is a problem'.\x0a    self confirm: 'Affirmative?'.\x0a    self prompt: 'Your name:'.\x0a\x0a    self ajax: #{\x0a        'url' -> '/patch.js'. 'type' -> 'GET'. dataType->'script'\x0a    }.";
+smalltalk.addMethod(
+smalltalk.method({
+selector: "ajax:",
+category: 'actions',
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(jQuery)._ajax_(anObject);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"ajax:",{anObject:anObject},smalltalk.BrowserInterface)})},
+args: ["anObject"],
+source: "ajax: anObject\x0a\x09^jQuery ajax: anObject",
+messageSends: ["ajax:"],
+referencedClasses: []
+}),
+smalltalk.BrowserInterface);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "alert:",
+category: 'actions',
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(window)._alert_(aString);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},smalltalk.BrowserInterface)})},
+args: ["aString"],
+source: "alert: aString\x0a\x09^window alert: aString",
+messageSends: ["alert:"],
+referencedClasses: []
+}),
+smalltalk.BrowserInterface);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "confirm:",
+category: 'actions',
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(window)._confirm_(aString);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"confirm:",{aString:aString},smalltalk.BrowserInterface)})},
+args: ["aString"],
+source: "confirm: aString\x0a\x09^window confirm: aString",
+messageSends: ["confirm:"],
+referencedClasses: []
+}),
+smalltalk.BrowserInterface);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "isAvailable",
+category: 'testing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return typeof window !== "undefined" && typeof jQuery !== "undefined";
+return self}, function($ctx1) {$ctx1.fill(self,"isAvailable",{},smalltalk.BrowserInterface)})},
+args: [],
+source: "isAvailable\x0a<return typeof window !== \x22undefined\x22 && typeof jQuery !== \x22undefined\x22>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.BrowserInterface);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "prompt:",
+category: 'actions',
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(window)._prompt_(aString);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"prompt:",{aString:aString},smalltalk.BrowserInterface)})},
+args: ["aString"],
+source: "prompt: aString\x0a\x09^window prompt: aString",
+messageSends: ["prompt:"],
+referencedClasses: []
+}),
+smalltalk.BrowserInterface);
+
+
+smalltalk.BrowserInterface.klass.iVarNames = ['uiWorker','ajaxWorker'];
+
 smalltalk.addClass('HTMLCanvas', smalltalk.Object, ['root'], 'Canvas');
 smalltalk.HTMLCanvas.comment="I am a canvas for building HTML.\x0a\x0aI provide the `#tag:` method to create a `TagBrush` (wrapping a DOM element) and convenience methods in the `tags` protocol.\x0a\x0a## API\x0a\x0aMy instances are used as the argument of the `#renderOn:` method of `Widget` objects.\x0a\x0aThe `#with:` method is used to compose HTML, nesting tags. `#with:` can take a `TagBrush`, a `String`, a `BlockClosure` or a `Widget` as argument.\x0a\x0a## Usage example:\x0a\x0a    aCanvas a \x0a        with: [ aCanvas span with: 'click me' ];\x0a        onClick: [ window alert: 'clicked!' ]";
 smalltalk.addMethod(
@@ -2623,12 +2717,12 @@ fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-$1=_st(window)._jQuery_(self._element());
+$1=_st(self._element())._asJQuery();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asJQuery",{},smalltalk.TagBrush)})},
 args: [],
-source: "asJQuery\x0a\x09^window jQuery: self element",
-messageSends: ["jQuery:", "element"],
+source: "asJQuery\x0a\x09^self element asJQuery",
+messageSends: ["asJQuery", "element"],
 referencedClasses: []
 }),
 smalltalk.TagBrush);
@@ -3628,7 +3722,7 @@ referencedClasses: []
 smalltalk.StyleTag.klass);
 
 
-smalltalk.addClass('Widget', smalltalk.Object, [], 'Canvas');
+smalltalk.addClass('Widget', smalltalk.InterfacingObject, [], 'Canvas');
 smalltalk.Widget.comment="I am a presenter building HTML. Subclasses are typically reusable components.\x0a\x0a## API\x0a\x0aUse `#renderContentOn:` to build HTML. (See `HTMLCanvas` and `TagBrush` classes for more about building HTML).\x0a\x0aTo add a widget to the page, the convenience method `#appendToJQuery:` is very useful.\x0a\x0aExemple: \x0a\x0a    Counter new appendToJQuery: 'body' asJQuery";
 smalltalk.addMethod(
 smalltalk.method({
@@ -3695,7 +3789,6 @@ referencedClasses: []
 }),
 smalltalk.Widget.klass);
 
-
 smalltalk.addMethod(
 smalltalk.method({
 selector: "appendToBrush:",

+ 1 - 1
js/Compiler-AST.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Compiler-AST');
+
 smalltalk.addClass('Node', smalltalk.Object, ['parent', 'position', 'nodes', 'shouldBeInlined', 'shouldBeAliased'], 'Compiler-AST');
 smalltalk.addMethod(
 smalltalk.method({
@@ -1619,7 +1620,6 @@ messageSends: ["visitClassReferenceNode:"]}),
 smalltalk.ClassReferenceNode);
 
 
-
 smalltalk.addMethod(
 smalltalk.method({
 selector: "isNode",

+ 1 - 1
js/Compiler-AST.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Compiler-AST');
+
 smalltalk.addClass('Node', smalltalk.Object, ['parent', 'position', 'nodes', 'shouldBeInlined', 'shouldBeAliased'], 'Compiler-AST');
 smalltalk.Node.comment="I am the abstract root class of the abstract syntax tree.\x0a\x0aConcrete classes should implement `#accept:` to allow visiting.\x0a\x0a`position` holds a point containing line and column number of the symbol location in the original source file.";
 smalltalk.addMethod(
@@ -2214,7 +2215,6 @@ referencedClasses: []
 smalltalk.ClassReferenceNode);
 
 
-
 smalltalk.addMethod(
 smalltalk.method({
 selector: "isNode",

+ 1 - 1
js/Compiler-Core.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Compiler-Core');
+
 smalltalk.addClass('AbstractCodeGenerator', smalltalk.Object, ['currentClass', 'source'], 'Compiler-Core');
 smalltalk.addMethod(
 smalltalk.method({
@@ -755,5 +756,4 @@ messageSends: ["visitNode:"]}),
 smalltalk.NodeVisitor);
 
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Compiler-Core.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Compiler-Core');
+
 smalltalk.addClass('AbstractCodeGenerator', smalltalk.Object, ['currentClass', 'source'], 'Compiler-Core');
 smalltalk.AbstractCodeGenerator.comment="I am the abstract super class of all code generators and provide their common API.";
 smalltalk.addMethod(
@@ -1020,5 +1021,4 @@ referencedClasses: []
 smalltalk.NodeVisitor);
 
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Compiler-Exceptions.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Compiler-Exceptions');
+
 smalltalk.addClass('CompilerError', smalltalk.Error, [], 'Compiler-Exceptions');
 
 
@@ -157,5 +158,4 @@ messageSends: ["handleError:", "basicSignal:"]}),
 smalltalk.RethrowErrorHandler);
 
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Compiler-Exceptions.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Compiler-Exceptions');
+
 smalltalk.addClass('CompilerError', smalltalk.Error, [], 'Compiler-Exceptions');
 smalltalk.CompilerError.comment="I am the common superclass of all compiling errors.";
 
@@ -220,5 +221,4 @@ referencedClasses: []
 smalltalk.RethrowErrorHandler);
 
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Compiler-IR.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Compiler-IR');
+
 smalltalk.addClass('IRASTTranslator', smalltalk.NodeVisitor, ['source', 'theClass', 'method', 'sequence', 'nextAlias'], 'Compiler-IR');
 smalltalk.addMethod(
 smalltalk.method({
@@ -2747,7 +2748,6 @@ messageSends: ["ifEmpty:", "nextPutAll:", "do:separatedBy:", "lf"]}),
 smalltalk.JSStream);
 
 
-
 smalltalk.addMethod(
 smalltalk.method({
 selector: "appendToInstruction:",

+ 1 - 1
js/Compiler-IR.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Compiler-IR');
+
 smalltalk.addClass('IRASTTranslator', smalltalk.NodeVisitor, ['source', 'theClass', 'method', 'sequence', 'nextAlias'], 'Compiler-IR');
 smalltalk.IRASTTranslator.comment="I am the AST (abstract syntax tree) visitor responsible for building the intermediate representation graph.";
 smalltalk.addMethod(
@@ -3641,7 +3642,6 @@ referencedClasses: []
 smalltalk.JSStream);
 
 
-
 smalltalk.addMethod(
 smalltalk.method({
 selector: "appendToInstruction:",

+ 1 - 1
js/Compiler-Inlining.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Compiler-Inlining');
+
 smalltalk.addClass('IRInlinedAssignment', smalltalk.IRAssignment, [], 'Compiler-Inlining');
 smalltalk.addMethod(
 smalltalk.method({
@@ -1157,5 +1158,4 @@ messageSends: ["new"]}),
 smalltalk.InliningCodeGenerator);
 
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Compiler-Inlining.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Compiler-Inlining');
+
 smalltalk.addClass('IRInlinedAssignment', smalltalk.IRAssignment, [], 'Compiler-Inlining');
 smalltalk.IRInlinedAssignment.comment="I represent an inlined assignment instruction.";
 smalltalk.addMethod(
@@ -1502,5 +1503,4 @@ referencedClasses: ["IRInliningJSTranslator"]
 smalltalk.InliningCodeGenerator);
 
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Compiler-Semantic.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Compiler-Semantic');
+
 smalltalk.addClass('LexicalScope', smalltalk.Object, ['node', 'instruction', 'temps', 'args', 'outerScope', 'blockIndex'], 'Compiler-Semantic');
 smalltalk.addMethod(
 smalltalk.method({
@@ -1388,5 +1389,4 @@ return $1;
 messageSends: ["theClass:", "new", "yourself"]}),
 smalltalk.SemanticAnalyzer.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Compiler-Semantic.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Compiler-Semantic');
+
 smalltalk.addClass('LexicalScope', smalltalk.Object, ['node', 'instruction', 'temps', 'args', 'outerScope', 'blockIndex'], 'Compiler-Semantic');
 smalltalk.LexicalScope.comment="I represent a lexical scope where variable names are associated with ScopeVars\x0aInstances are used for block scopes. Method scopes are instances of MethodLexicalScope.\x0a\x0aI am attached to a ScopeVar and method/block nodes.\x0aEach context (method/closure) get a fresh scope that inherits from its outer scope.";
 smalltalk.addMethod(
@@ -1839,5 +1840,4 @@ referencedClasses: []
 }),
 smalltalk.SemanticAnalyzer.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Compiler-Tests.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Compiler-Tests');
+
 smalltalk.addClass('ASTVisitorTest', smalltalk.TestCase, [], 'Compiler-Tests');
 smalltalk.addMethod(
 smalltalk.method({
@@ -1509,5 +1510,4 @@ messageSends: ["parse:", "visit:", "assert:", "isTempVar", "binding", "receiver"
 smalltalk.SemanticAnalyzerTest);
 
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Compiler-Tests.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Compiler-Tests');
+
 smalltalk.addClass('ASTVisitorTest', smalltalk.TestCase, [], 'Compiler-Tests');
 smalltalk.addMethod(
 smalltalk.method({
@@ -2019,5 +2020,4 @@ referencedClasses: []
 smalltalk.SemanticAnalyzerTest);
 
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Examples.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Examples');
+
 smalltalk.addClass('Counter', smalltalk.Widget, ['count', 'header'], 'Examples');
 smalltalk.addMethod(
 smalltalk.method({
@@ -82,5 +83,4 @@ return self}, function($ctx1) {$ctx1.fill(self,"tryExample",{},smalltalk.Counter
 messageSends: ["appendToJQuery:", "new", "asJQuery"]}),
 smalltalk.Counter.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Examples.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Examples');
+
 smalltalk.addClass('Counter', smalltalk.Widget, ['count', 'header'], 'Examples');
 smalltalk.Counter.comment="This is a trivial Widget example mimicking the classic Counter example in Seaside.\x0aIn order to play with it, just evaluate the doit below in a workspace.\x0aThen take a look in the HTML document above the IDE.\x0a\x0a\x09\x09Counter new appendToJQuery: 'body' asJQuery";
 smalltalk.addMethod(
@@ -108,5 +109,4 @@ referencedClasses: []
 }),
 smalltalk.Counter.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Helios-Announcements.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Announcements');
+
 smalltalk.addClass('HLAboutToChange', smalltalk.Object, ['actionBlock'], 'Helios-Announcements');
 smalltalk.addMethod(
 smalltalk.method({
@@ -435,5 +436,4 @@ smalltalk.addClass('HLShowInstanceToggled', smalltalk.HLAnnouncement, [], 'Helio
 
 smalltalk.addClass('HLSourceCodeSaved', smalltalk.HLAnnouncement, [], 'Helios-Announcements');
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Helios-Announcements.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Announcements');
+
 smalltalk.addClass('HLAboutToChange', smalltalk.Object, ['actionBlock'], 'Helios-Announcements');
 smalltalk.addMethod(
 smalltalk.method({
@@ -576,5 +577,4 @@ smalltalk.addClass('HLShowInstanceToggled', smalltalk.HLAnnouncement, [], 'Helio
 
 smalltalk.addClass('HLSourceCodeSaved', smalltalk.HLAnnouncement, [], 'Helios-Announcements');
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Helios-Browser.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Browser');
+
 smalltalk.addClass('HLBrowser', smalltalk.HLWidget, ['model', 'packagesListWidget', 'classesListWidget', 'protocolsListWidget', 'methodsListWidget', 'sourceWidget', 'bottomDiv'], 'Helios-Browser');
 smalltalk.addMethod(
 smalltalk.method({
@@ -2986,5 +2987,4 @@ return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.HLSelectorsCac
 messageSends: ["shouldNotImplement"]}),
 smalltalk.HLSelectorsCache.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 3 - 3
js/Helios-Browser.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Browser');
+
 smalltalk.addClass('HLBrowser', smalltalk.HLWidget, ['model', 'packagesListWidget', 'classesListWidget', 'protocolsListWidget', 'methodsListWidget', 'sourceWidget', 'bottomDiv'], 'Helios-Browser');
 smalltalk.HLBrowser.comment="I render a system browser with 4 panes (Packages, Classes, Protocols, Methods) and a source area.";
 smalltalk.addMethod(
@@ -858,7 +859,7 @@ return _st(self._announcer())._announce_(_st($HLShowInstanceToggled())._new());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean},smalltalk.HLBrowserModel)})},
 args: ["aBoolean"],
-source: "showInstance: aBoolean\x0a\x0a\x09self withChangesDo: [\x0a\x09\x09showInstance := aBoolean.\x0a\x0a    \x09self selectedClass ifNotNil: [\x0a    \x09\x09self selectedClass: (aBoolean\x0a    \x09\x09\x09ifTrue: [self selectedClass theNonMetaClass ]\x0a\x09    \x09  \x09ifFalse: [ self selectedClass theMetaClass ]) ].\x0a    \x0a\x09\x09self announcer announce: HLShowInstanceToggled new ] ",
+source: "showInstance: aBoolean\x0a\x0a\x09self withChangesDo: [\x0a\x09\x09showInstance := aBoolean.\x0a\x0a    \x09self selectedClass ifNotNil: [\x0a    \x09\x09self selectedClass: (aBoolean\x0a    \x09\x09\x09ifTrue: [self selectedClass theNonMetaClass ]\x0a\x09    \x09  \x09ifFalse: [ self selectedClass theMetaClass ]) ].\x0a    \x0a\x09\x09self announcer announce: HLShowInstanceToggled new ]",
 messageSends: ["withChangesDo:", "ifNotNil:", "selectedClass", "selectedClass:", "ifTrue:ifFalse:", "theNonMetaClass", "theMetaClass", "announce:", "announcer", "new"],
 referencedClasses: ["HLShowInstanceToggled"]
 }),
@@ -2935,7 +2936,7 @@ $1;
 _st(self._model())._selectedMethod_(self._methodForSelector_(aSelector));
 return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aSelector:aSelector},smalltalk.HLMethodsListWidget)})},
 args: ["aSelector"],
-source: "selectItem: aSelector\x0a\x09aSelector ifNil: [ ^ self model selectedMethod: nil ].\x0a\x0a   \x09self model selectedMethod: (self methodForSelector: aSelector)\x0a    ",
+source: "selectItem: aSelector\x0a\x09aSelector ifNil: [ ^ self model selectedMethod: nil ].\x0a\x0a   \x09self model selectedMethod: (self methodForSelector: aSelector)",
 messageSends: ["ifNil:", "selectedMethod:", "model", "methodForSelector:"],
 referencedClasses: []
 }),
@@ -3893,5 +3894,4 @@ referencedClasses: []
 }),
 smalltalk.HLSelectorsCache.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Helios-Commands-Browser.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Commands-Browser');
+
 smalltalk.addClass('HLBrowserCommand', smalltalk.HLToolCommand, [], 'Helios-Commands-Browser');
 
 smalltalk.addMethod(
@@ -418,5 +419,4 @@ return "Instance side";
 messageSends: []}),
 smalltalk.HLToggleInstanceSideCommand.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Helios-Commands-Browser.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Commands-Browser');
+
 smalltalk.addClass('HLBrowserCommand', smalltalk.HLToolCommand, [], 'Helios-Commands-Browser');
 
 smalltalk.addMethod(
@@ -588,5 +589,4 @@ referencedClasses: []
 }),
 smalltalk.HLToggleInstanceSideCommand.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Helios-Commands-Core.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Commands-Core');
+
 smalltalk.addClass('HLCommand', smalltalk.Object, ['input'], 'Helios-Commands-Core');
 smalltalk.addMethod(
 smalltalk.method({
@@ -627,5 +628,4 @@ return "View";
 messageSends: []}),
 smalltalk.HLViewCommand.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 2 - 2
js/Helios-Commands-Core.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Commands-Core');
+
 smalltalk.addClass('HLCommand', smalltalk.Object, ['input'], 'Helios-Commands-Core');
 smalltalk.addMethod(
 smalltalk.method({
@@ -124,7 +125,7 @@ var self=this;
 return smalltalk.withContext(function($ctx1) { 
 return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLCommand)})},
 args: [],
-source: "execute\x0a\x09",
+source: "execute",
 messageSends: [],
 referencedClasses: []
 }),
@@ -857,5 +858,4 @@ referencedClasses: []
 }),
 smalltalk.HLViewCommand.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Helios-Commands-Tools.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Commands-Tools');
+
 smalltalk.addClass('HLToolCommand', smalltalk.HLModelCommand, [], 'Helios-Commands-Tools');
 smalltalk.addMethod(
 smalltalk.method({
@@ -1341,5 +1342,4 @@ return "Rename protocol...";
 messageSends: []}),
 smalltalk.HLRenameProtocolCommand.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Helios-Commands-Tools.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Commands-Tools');
+
 smalltalk.addClass('HLToolCommand', smalltalk.HLModelCommand, [], 'Helios-Commands-Tools');
 smalltalk.addMethod(
 smalltalk.method({
@@ -1896,5 +1897,4 @@ referencedClasses: []
 }),
 smalltalk.HLRenameProtocolCommand.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 0 - 1000
js/Helios-Commands.deploy.js

@@ -1,1000 +0,0 @@
-(function(smalltalk,nil,_st){
-smalltalk.addPackage('Helios-Commands');
-smalltalk.addClass('HLCommand', smalltalk.Object, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_asActionBinding",
-smalltalk.method({
-selector: "asActionBinding",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st((smalltalk.HLBindingAction || HLBindingAction))._on_labelled_(_st(self)._key(),_st(self)._label()))._callback_((function(){
-return smalltalk.withContext(function($ctx2) {
-return _st(self)._execute();
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"asActionBinding",{},smalltalk.HLCommand)})},
-messageSends: ["callback:", "execute", "on:labelled:", "key", "label"]}),
-smalltalk.HLCommand);
-
-smalltalk.addMethod(
-"_asBinding",
-smalltalk.method({
-selector: "asBinding",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=_st(self)._isBindingGroup();
-if(smalltalk.assert($2)){
-$1=_st(self)._asGroupBinding();
-} else {
-$1=_st(self)._asActionBinding();
-};
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"asBinding",{},smalltalk.HLCommand)})},
-messageSends: ["ifTrue:ifFalse:", "asGroupBinding", "asActionBinding", "isBindingGroup"]}),
-smalltalk.HLCommand);
-
-smalltalk.addMethod(
-"_asGroupBinding",
-smalltalk.method({
-selector: "asGroupBinding",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st((smalltalk.HLBindingGroup || HLBindingGroup))._on_labelled_(_st(self)._key(),_st(self)._label());
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"asGroupBinding",{},smalltalk.HLCommand)})},
-messageSends: ["on:labelled:", "key", "label"]}),
-smalltalk.HLCommand);
-
-smalltalk.addMethod(
-"_documentation",
-smalltalk.method({
-selector: "documentation",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(self)._class())._documentation();
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"documentation",{}, smalltalk.HLCommand)})},
-messageSends: ["documentation", "class"]}),
-smalltalk.HLCommand);
-
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"execute",{}, smalltalk.HLCommand)})},
-messageSends: []}),
-smalltalk.HLCommand);
-
-smalltalk.addMethod(
-"_isBindingGroup",
-smalltalk.method({
-selector: "isBindingGroup",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(_st(_st(self)._class())._methodDictionary())._includesKey_("execute"))._not();
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"isBindingGroup",{},smalltalk.HLCommand)})},
-messageSends: ["not", "includesKey:", "methodDictionary", "class"]}),
-smalltalk.HLCommand);
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(self)._class())._key();
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.HLCommand)})},
-messageSends: ["key", "class"]}),
-smalltalk.HLCommand);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(self)._class())._label();
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLCommand)})},
-messageSends: ["label", "class"]}),
-smalltalk.HLCommand);
-
-smalltalk.addMethod(
-"_registerOn_",
-smalltalk.method({
-selector: "registerOn:",
-fn: function (aBinding){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(aBinding)._add_(_st(self)._asBinding());
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"registerOn:",{aBinding:aBinding},smalltalk.HLCommand)})},
-messageSends: ["add:", "asBinding"]}),
-smalltalk.HLCommand);
-
-
-smalltalk.addMethod(
-"_concreteSubclasses",
-smalltalk.method({
-selector: "concreteSubclasses",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(self)._subclasses())._select_((function(each){
-return smalltalk.withContext(function($ctx2) {
-return _st(each)._isConcrete();
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"concreteSubclasses",{},smalltalk.HLCommand.klass)})},
-messageSends: ["select:", "isConcrete", "subclasses"]}),
-smalltalk.HLCommand.klass);
-
-smalltalk.addMethod(
-"_documentation",
-smalltalk.method({
-selector: "documentation",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "";
-}, function($ctx1) {$ctx1.fill(self,"documentation",{}, smalltalk.HLCommand.klass)})},
-messageSends: []}),
-smalltalk.HLCommand.klass);
-
-smalltalk.addMethod(
-"_isConcrete",
-smalltalk.method({
-selector: "isConcrete",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(self)._key())._notNil();
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"isConcrete",{},smalltalk.HLCommand.klass)})},
-messageSends: ["notNil", "key"]}),
-smalltalk.HLCommand.klass);
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return nil;
-}, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.HLCommand.klass)})},
-messageSends: []}),
-smalltalk.HLCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "";
-}, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLCommand.klass)})},
-messageSends: []}),
-smalltalk.HLCommand.klass);
-
-smalltalk.addMethod(
-"_registerConcreteClassesOn_",
-smalltalk.method({
-selector: "registerConcreteClassesOn:",
-fn: function (aBinding){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-_st(_st(self)._concreteSubclasses())._do_((function(each){
-var binding;
-return smalltalk.withContext(function($ctx2) {
-binding=_st(each)._registerOn_(aBinding);
-binding;
-$1=_st(binding)._isBindingGroup();
-if(smalltalk.assert($1)){
-return _st(each)._registerConcreteClassesOn_(binding);
-};
-}, function($ctx2) {$ctx2.fillBlock({each:each,binding:binding},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"registerConcreteClassesOn:",{aBinding:aBinding},smalltalk.HLCommand.klass)})},
-messageSends: ["do:", "registerOn:", "ifTrue:", "registerConcreteClassesOn:", "isBindingGroup", "concreteSubclasses"]}),
-smalltalk.HLCommand.klass);
-
-smalltalk.addMethod(
-"_registerOn_",
-smalltalk.method({
-selector: "registerOn:",
-fn: function (aBinding){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(self)._new())._registerOn_(aBinding);
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"registerOn:",{aBinding:aBinding},smalltalk.HLCommand.klass)})},
-messageSends: ["registerOn:", "new"]}),
-smalltalk.HLCommand.klass);
-
-
-smalltalk.addClass('HLCloseTabCommand', smalltalk.HLCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(_st((smalltalk.HLManager || HLManager))._current())._removeActiveTab();
-return self}, function($ctx1) {$ctx1.fill(self,"execute",{}, smalltalk.HLCloseTabCommand)})},
-messageSends: ["removeActiveTab", "current"]}),
-smalltalk.HLCloseTabCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (87);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLCloseTabCommand.klass)})},
-messageSends: []}),
-smalltalk.HLCloseTabCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Close tab";
-}, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLCloseTabCommand.klass)})},
-messageSends: []}),
-smalltalk.HLCloseTabCommand.klass);
-
-
-smalltalk.addClass('HLModelCommand', smalltalk.HLCommand, ['model'], 'Helios-Commands');
-smalltalk.addMethod(
-"_model",
-smalltalk.method({
-selector: "model",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self["@model"];
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLModelCommand)})},
-messageSends: []}),
-smalltalk.HLModelCommand);
-
-smalltalk.addMethod(
-"_model_",
-smalltalk.method({
-selector: "model:",
-fn: function (aModel){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self["@model"]=aModel;
-return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLModelCommand)})},
-messageSends: []}),
-smalltalk.HLModelCommand);
-
-
-smalltalk.addMethod(
-"_for_",
-smalltalk.method({
-selector: "for:",
-fn: function (aModel){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(self)._new();
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"for:",{aModel:aModel},smalltalk.HLModelCommand.klass)})},
-messageSends: ["new"]}),
-smalltalk.HLModelCommand.klass);
-
-smalltalk.addMethod(
-"_registerConcreteClassesOn_for_",
-smalltalk.method({
-selector: "registerConcreteClassesOn:for:",
-fn: function (aBinding,aModel){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-_st(_st(self)._concreteSubclasses())._do_((function(each){
-var binding;
-return smalltalk.withContext(function($ctx2) {
-binding=_st(each)._registerOn_for_(aBinding,aModel);
-binding;
-$1=_st(binding)._isBindingGroup();
-if(smalltalk.assert($1)){
-return _st(each)._registerConcreteClassesOn_for_(binding,aModel);
-};
-}, function($ctx2) {$ctx2.fillBlock({each:each,binding:binding},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"registerConcreteClassesOn:for:",{aBinding:aBinding,aModel:aModel},smalltalk.HLModelCommand.klass)})},
-messageSends: ["do:", "registerOn:for:", "ifTrue:", "registerConcreteClassesOn:for:", "isBindingGroup", "concreteSubclasses"]}),
-smalltalk.HLModelCommand.klass);
-
-smalltalk.addMethod(
-"_registerOn_for_",
-smalltalk.method({
-selector: "registerOn:for:",
-fn: function (aBinding,aModel){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(self)._for_(aModel))._registerOn_(aBinding);
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"registerOn:for:",{aBinding:aBinding,aModel:aModel},smalltalk.HLModelCommand.klass)})},
-messageSends: ["registerOn:", "for:"]}),
-smalltalk.HLModelCommand.klass);
-
-
-smalltalk.addClass('HLBrowserCommand', smalltalk.HLModelCommand, [], 'Helios-Commands');
-
-smalltalk.addMethod(
-"_for_",
-smalltalk.method({
-selector: "for:",
-fn: function (aBrowserModel){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
-$2=_st(self)._new();
-_st($2)._model_(aBrowserModel);
-$3=_st($2)._yourself();
-$1=$3;
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"for:",{aBrowserModel:aBrowserModel},smalltalk.HLBrowserCommand.klass)})},
-messageSends: ["model:", "new", "yourself"]}),
-smalltalk.HLBrowserCommand.klass);
-
-
-smalltalk.addClass('HLGoToCommand', smalltalk.HLBrowserCommand, [], 'Helios-Commands');
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (71);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGoToCommand.klass)})},
-messageSends: []}),
-smalltalk.HLGoToCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Go to";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToCommand.klass)})},
-messageSends: []}),
-smalltalk.HLGoToCommand.klass);
-
-
-smalltalk.addClass('HLGoToClassesCommand', smalltalk.HLGoToCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(_st(self)._model())._focusOnClasses();
-return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLGoToClassesCommand)})},
-messageSends: ["focusOnClasses", "model"]}),
-smalltalk.HLGoToClassesCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (67);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGoToClassesCommand.klass)})},
-messageSends: []}),
-smalltalk.HLGoToClassesCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Classes";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToClassesCommand.klass)})},
-messageSends: []}),
-smalltalk.HLGoToClassesCommand.klass);
-
-
-smalltalk.addClass('HLGoToMethodsCommand', smalltalk.HLGoToCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(_st(self)._model())._focusOnMethods();
-return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLGoToMethodsCommand)})},
-messageSends: ["focusOnMethods", "model"]}),
-smalltalk.HLGoToMethodsCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (77);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGoToMethodsCommand.klass)})},
-messageSends: []}),
-smalltalk.HLGoToMethodsCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Methods";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToMethodsCommand.klass)})},
-messageSends: []}),
-smalltalk.HLGoToMethodsCommand.klass);
-
-
-smalltalk.addClass('HLGoToPackagesCommand', smalltalk.HLGoToCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(_st(self)._model())._focusOnPackages();
-return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLGoToPackagesCommand)})},
-messageSends: ["focusOnPackages", "model"]}),
-smalltalk.HLGoToPackagesCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (80);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGoToPackagesCommand.klass)})},
-messageSends: []}),
-smalltalk.HLGoToPackagesCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Packages";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToPackagesCommand.klass)})},
-messageSends: []}),
-smalltalk.HLGoToPackagesCommand.klass);
-
-
-smalltalk.addClass('HLGoToProtocolsCommand', smalltalk.HLGoToCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(_st(self)._model())._focusOnProtocols();
-return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLGoToProtocolsCommand)})},
-messageSends: ["focusOnProtocols", "model"]}),
-smalltalk.HLGoToProtocolsCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (84);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGoToProtocolsCommand.klass)})},
-messageSends: []}),
-smalltalk.HLGoToProtocolsCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Protocols";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToProtocolsCommand.klass)})},
-messageSends: []}),
-smalltalk.HLGoToProtocolsCommand.klass);
-
-
-smalltalk.addClass('HLGoToSourceCodeCommand', smalltalk.HLGoToCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(_st(self)._model())._focusOnSourceCode();
-return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLGoToSourceCodeCommand)})},
-messageSends: ["focusOnSourceCode", "model"]}),
-smalltalk.HLGoToSourceCodeCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (83);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGoToSourceCodeCommand.klass)})},
-messageSends: []}),
-smalltalk.HLGoToSourceCodeCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Source code";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToSourceCodeCommand.klass)})},
-messageSends: []}),
-smalltalk.HLGoToSourceCodeCommand.klass);
-
-
-smalltalk.addClass('HLMoveToCommand', smalltalk.HLBrowserCommand, [], 'Helios-Commands');
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (77);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLMoveToCommand.klass)})},
-messageSends: []}),
-smalltalk.HLMoveToCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Move";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMoveToCommand.klass)})},
-messageSends: []}),
-smalltalk.HLMoveToCommand.klass);
-
-
-smalltalk.addClass('HLMoveMethodToCommand', smalltalk.HLMoveToCommand, [], 'Helios-Commands');
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (77);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLMoveMethodToCommand.klass)})},
-messageSends: []}),
-smalltalk.HLMoveMethodToCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Method";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMoveMethodToCommand.klass)})},
-messageSends: []}),
-smalltalk.HLMoveMethodToCommand.klass);
-
-
-smalltalk.addClass('HLMoveMethodToClassCommand', smalltalk.HLMoveMethodToCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLMoveMethodToClassCommand)})},
-messageSends: []}),
-smalltalk.HLMoveMethodToClassCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (67);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLMoveMethodToClassCommand.klass)})},
-messageSends: []}),
-smalltalk.HLMoveMethodToClassCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "to class";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMoveMethodToClassCommand.klass)})},
-messageSends: []}),
-smalltalk.HLMoveMethodToClassCommand.klass);
-
-
-smalltalk.addClass('HLMoveMethodToProtocolCommand', smalltalk.HLMoveMethodToCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLMoveMethodToProtocolCommand)})},
-messageSends: []}),
-smalltalk.HLMoveMethodToProtocolCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (84);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLMoveMethodToProtocolCommand.klass)})},
-messageSends: []}),
-smalltalk.HLMoveMethodToProtocolCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "to protocol";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMoveMethodToProtocolCommand.klass)})},
-messageSends: []}),
-smalltalk.HLMoveMethodToProtocolCommand.klass);
-
-
-smalltalk.addClass('HLToggleCommand', smalltalk.HLBrowserCommand, [], 'Helios-Commands');
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (84);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLToggleCommand.klass)})},
-messageSends: []}),
-smalltalk.HLToggleCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Toggle";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLToggleCommand.klass)})},
-messageSends: []}),
-smalltalk.HLToggleCommand.klass);
-
-
-smalltalk.addClass('HLToggleClassSideCommand', smalltalk.HLToggleCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(_st(self)._model())._showInstance_(false);
-return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLToggleClassSideCommand)})},
-messageSends: ["showInstance:", "model"]}),
-smalltalk.HLToggleClassSideCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (67);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLToggleClassSideCommand.klass)})},
-messageSends: []}),
-smalltalk.HLToggleClassSideCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Class side";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLToggleClassSideCommand.klass)})},
-messageSends: []}),
-smalltalk.HLToggleClassSideCommand.klass);
-
-
-smalltalk.addClass('HLToggleInstanceSideCommand', smalltalk.HLToggleCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(_st(self)._model())._showInstance_(true);
-return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLToggleInstanceSideCommand)})},
-messageSends: ["showInstance:", "model"]}),
-smalltalk.HLToggleInstanceSideCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (73);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLToggleInstanceSideCommand.klass)})},
-messageSends: []}),
-smalltalk.HLToggleInstanceSideCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Instance side";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLToggleInstanceSideCommand.klass)})},
-messageSends: []}),
-smalltalk.HLToggleInstanceSideCommand.klass);
-
-
-smalltalk.addClass('HLOpenCommand', smalltalk.HLCommand, [], 'Helios-Commands');
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (79);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLOpenCommand.klass)})},
-messageSends: []}),
-smalltalk.HLOpenCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Open";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLOpenCommand.klass)})},
-messageSends: []}),
-smalltalk.HLOpenCommand.klass);
-
-
-smalltalk.addClass('HLOpenBrowserCommand', smalltalk.HLOpenCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st((smalltalk.HLBrowser || HLBrowser))._openAsTab();
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"execute",{}, smalltalk.HLOpenBrowserCommand)})},
-messageSends: ["openAsTab"]}),
-smalltalk.HLOpenBrowserCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (66);
-}, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.HLOpenBrowserCommand.klass)})},
-messageSends: []}),
-smalltalk.HLOpenBrowserCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Browser";
-}, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLOpenBrowserCommand.klass)})},
-messageSends: []}),
-smalltalk.HLOpenBrowserCommand.klass);
-
-
-smalltalk.addClass('HLOpenTranscriptCommand', smalltalk.HLOpenCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st((smalltalk.HLTranscript || HLTranscript))._openAsTab();
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"execute",{}, smalltalk.HLOpenTranscriptCommand)})},
-messageSends: ["openAsTab"]}),
-smalltalk.HLOpenTranscriptCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (84);
-}, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.HLOpenTranscriptCommand.klass)})},
-messageSends: []}),
-smalltalk.HLOpenTranscriptCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Transcript";
-}, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLOpenTranscriptCommand.klass)})},
-messageSends: []}),
-smalltalk.HLOpenTranscriptCommand.klass);
-
-
-smalltalk.addClass('HLOpenWorkspaceCommand', smalltalk.HLOpenCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st((smalltalk.HLCodeWidget || HLCodeWidget))._openAsTab();
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLOpenWorkspaceCommand)})},
-messageSends: ["openAsTab"]}),
-smalltalk.HLOpenWorkspaceCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (87);
-}, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.HLOpenWorkspaceCommand.klass)})},
-messageSends: []}),
-smalltalk.HLOpenWorkspaceCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Workspace";
-}, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLOpenWorkspaceCommand.klass)})},
-messageSends: []}),
-smalltalk.HLOpenWorkspaceCommand.klass);
-
-
-smalltalk.addClass('HLViewCommand', smalltalk.HLCommand, [], 'Helios-Commands');
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "View";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLViewCommand.klass)})},
-messageSends: []}),
-smalltalk.HLViewCommand.klass);
-
-
-})(global_smalltalk,global_nil,global__st);

+ 0 - 1360
js/Helios-Commands.js

@@ -1,1360 +0,0 @@
-(function(smalltalk,nil,_st){
-smalltalk.addPackage('Helios-Commands');
-smalltalk.addClass('HLCommand', smalltalk.Object, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_asActionBinding",
-smalltalk.method({
-selector: "asActionBinding",
-category: 'converting',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st((smalltalk.HLBindingAction || HLBindingAction))._on_labelled_(_st(self)._key(),_st(self)._label()))._callback_((function(){
-return smalltalk.withContext(function($ctx2) {
-return _st(self)._execute();
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"asActionBinding",{},smalltalk.HLCommand)})},
-args: [],
-source: "asActionBinding\x0a\x09^ (HLBindingAction on: self key labelled: self label)\x0a    \x09callback: [ self execute ]",
-messageSends: ["callback:", "execute", "on:labelled:", "key", "label"],
-referencedClasses: ["HLBindingAction"]
-}),
-smalltalk.HLCommand);
-
-smalltalk.addMethod(
-"_asBinding",
-smalltalk.method({
-selector: "asBinding",
-category: 'converting',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=_st(self)._isBindingGroup();
-if(smalltalk.assert($2)){
-$1=_st(self)._asGroupBinding();
-} else {
-$1=_st(self)._asActionBinding();
-};
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"asBinding",{},smalltalk.HLCommand)})},
-args: [],
-source: "asBinding\x0a\x09^ self isBindingGroup\x0a\x09\x09ifTrue: [ self asGroupBinding ]\x0a\x09\x09ifFalse: [ self asActionBinding ]",
-messageSends: ["ifTrue:ifFalse:", "asGroupBinding", "asActionBinding", "isBindingGroup"],
-referencedClasses: []
-}),
-smalltalk.HLCommand);
-
-smalltalk.addMethod(
-"_asGroupBinding",
-smalltalk.method({
-selector: "asGroupBinding",
-category: 'converting',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st((smalltalk.HLBindingGroup || HLBindingGroup))._on_labelled_(_st(self)._key(),_st(self)._label());
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"asGroupBinding",{},smalltalk.HLCommand)})},
-args: [],
-source: "asGroupBinding\x0a\x09^ HLBindingGroup \x0a\x09\x09on: self key \x0a\x09\x09labelled: self label",
-messageSends: ["on:labelled:", "key", "label"],
-referencedClasses: ["HLBindingGroup"]
-}),
-smalltalk.HLCommand);
-
-smalltalk.addMethod(
-"_documentation",
-smalltalk.method({
-selector: "documentation",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(self)._class())._documentation();
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"documentation",{}, smalltalk.HLCommand)})},
-args: [],
-source: "documentation\x0a\x09^ self class documentation",
-messageSends: ["documentation", "class"],
-referencedClasses: []
-}),
-smalltalk.HLCommand);
-
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-category: 'executing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"execute",{}, smalltalk.HLCommand)})},
-args: [],
-source: "execute\x0a\x09",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLCommand);
-
-smalltalk.addMethod(
-"_isBindingGroup",
-smalltalk.method({
-selector: "isBindingGroup",
-category: 'testing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(_st(_st(self)._class())._methodDictionary())._includesKey_("execute"))._not();
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"isBindingGroup",{},smalltalk.HLCommand)})},
-args: [],
-source: "isBindingGroup\x0a\x09^ (self class methodDictionary includesKey: 'execute') not",
-messageSends: ["not", "includesKey:", "methodDictionary", "class"],
-referencedClasses: []
-}),
-smalltalk.HLCommand);
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(self)._class())._key();
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.HLCommand)})},
-args: [],
-source: "key\x0a\x09^ self class key",
-messageSends: ["key", "class"],
-referencedClasses: []
-}),
-smalltalk.HLCommand);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(self)._class())._label();
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLCommand)})},
-args: [],
-source: "label\x0a\x09^ self class label",
-messageSends: ["label", "class"],
-referencedClasses: []
-}),
-smalltalk.HLCommand);
-
-smalltalk.addMethod(
-"_registerOn_",
-smalltalk.method({
-selector: "registerOn:",
-category: 'registration',
-fn: function (aBinding){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(aBinding)._add_(_st(self)._asBinding());
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"registerOn:",{aBinding:aBinding},smalltalk.HLCommand)})},
-args: ["aBinding"],
-source: "registerOn: aBinding\x0a\x09^ aBinding add: self asBinding",
-messageSends: ["add:", "asBinding"],
-referencedClasses: []
-}),
-smalltalk.HLCommand);
-
-
-smalltalk.addMethod(
-"_concreteSubclasses",
-smalltalk.method({
-selector: "concreteSubclasses",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(self)._subclasses())._select_((function(each){
-return smalltalk.withContext(function($ctx2) {
-return _st(each)._isConcrete();
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"concreteSubclasses",{},smalltalk.HLCommand.klass)})},
-args: [],
-source: "concreteSubclasses\x0a\x09^ self subclasses select: [ :each |\x0a\x09\x09each isConcrete ]",
-messageSends: ["select:", "isConcrete", "subclasses"],
-referencedClasses: []
-}),
-smalltalk.HLCommand.klass);
-
-smalltalk.addMethod(
-"_documentation",
-smalltalk.method({
-selector: "documentation",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "";
-}, function($ctx1) {$ctx1.fill(self,"documentation",{}, smalltalk.HLCommand.klass)})},
-args: [],
-source: "documentation\x0a\x09^ ''",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLCommand.klass);
-
-smalltalk.addMethod(
-"_isConcrete",
-smalltalk.method({
-selector: "isConcrete",
-category: 'testing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(self)._key())._notNil();
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"isConcrete",{},smalltalk.HLCommand.klass)})},
-args: [],
-source: "isConcrete\x0a\x09^ self key notNil",
-messageSends: ["notNil", "key"],
-referencedClasses: []
-}),
-smalltalk.HLCommand.klass);
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return nil;
-}, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.HLCommand.klass)})},
-args: [],
-source: "key\x0a\x09^ nil",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "";
-}, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLCommand.klass)})},
-args: [],
-source: "label\x0a\x09^ ''",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLCommand.klass);
-
-smalltalk.addMethod(
-"_registerConcreteClassesOn_",
-smalltalk.method({
-selector: "registerConcreteClassesOn:",
-category: 'registration',
-fn: function (aBinding){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-_st(_st(self)._concreteSubclasses())._do_((function(each){
-var binding;
-return smalltalk.withContext(function($ctx2) {
-binding=_st(each)._registerOn_(aBinding);
-binding;
-$1=_st(binding)._isBindingGroup();
-if(smalltalk.assert($1)){
-return _st(each)._registerConcreteClassesOn_(binding);
-};
-}, function($ctx2) {$ctx2.fillBlock({each:each,binding:binding},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"registerConcreteClassesOn:",{aBinding:aBinding},smalltalk.HLCommand.klass)})},
-args: ["aBinding"],
-source: "registerConcreteClassesOn: aBinding\x0a\x09self concreteSubclasses do: [ :each | | binding |\x0a\x09\x09binding := each registerOn: aBinding.\x0a\x09\x09binding isBindingGroup ifTrue: [\x0a\x09\x09\x09each registerConcreteClassesOn: binding ] ]",
-messageSends: ["do:", "registerOn:", "ifTrue:", "registerConcreteClassesOn:", "isBindingGroup", "concreteSubclasses"],
-referencedClasses: []
-}),
-smalltalk.HLCommand.klass);
-
-smalltalk.addMethod(
-"_registerOn_",
-smalltalk.method({
-selector: "registerOn:",
-category: 'registration',
-fn: function (aBinding){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(self)._new())._registerOn_(aBinding);
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"registerOn:",{aBinding:aBinding},smalltalk.HLCommand.klass)})},
-args: ["aBinding"],
-source: "registerOn: aBinding\x0a\x09^ self new registerOn: aBinding",
-messageSends: ["registerOn:", "new"],
-referencedClasses: []
-}),
-smalltalk.HLCommand.klass);
-
-
-smalltalk.addClass('HLCloseTabCommand', smalltalk.HLCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-category: 'executing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(_st((smalltalk.HLManager || HLManager))._current())._removeActiveTab();
-return self}, function($ctx1) {$ctx1.fill(self,"execute",{}, smalltalk.HLCloseTabCommand)})},
-args: [],
-source: "execute\x0a\x09HLManager current removeActiveTab",
-messageSends: ["removeActiveTab", "current"],
-referencedClasses: ["HLManager"]
-}),
-smalltalk.HLCloseTabCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (87);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLCloseTabCommand.klass)})},
-args: [],
-source: "key\x0a\x09^ 87",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLCloseTabCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Close tab";
-}, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLCloseTabCommand.klass)})},
-args: [],
-source: "label\x0a\x09^ 'Close tab'",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLCloseTabCommand.klass);
-
-
-smalltalk.addClass('HLModelCommand', smalltalk.HLCommand, ['model'], 'Helios-Commands');
-smalltalk.addMethod(
-"_model",
-smalltalk.method({
-selector: "model",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self["@model"];
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLModelCommand)})},
-args: [],
-source: "model\x0a\x09^ model",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLModelCommand);
-
-smalltalk.addMethod(
-"_model_",
-smalltalk.method({
-selector: "model:",
-category: 'accessing',
-fn: function (aModel){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self["@model"]=aModel;
-return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLModelCommand)})},
-args: ["aModel"],
-source: "model: aModel\x0a\x09model := aModel",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLModelCommand);
-
-
-smalltalk.addMethod(
-"_for_",
-smalltalk.method({
-selector: "for:",
-category: 'instance creation',
-fn: function (aModel){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(self)._new();
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"for:",{aModel:aModel},smalltalk.HLModelCommand.klass)})},
-args: ["aModel"],
-source: "for: aModel\x0a\x09^ self new",
-messageSends: ["new"],
-referencedClasses: []
-}),
-smalltalk.HLModelCommand.klass);
-
-smalltalk.addMethod(
-"_registerConcreteClassesOn_for_",
-smalltalk.method({
-selector: "registerConcreteClassesOn:for:",
-category: 'registration',
-fn: function (aBinding,aModel){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-_st(_st(self)._concreteSubclasses())._do_((function(each){
-var binding;
-return smalltalk.withContext(function($ctx2) {
-binding=_st(each)._registerOn_for_(aBinding,aModel);
-binding;
-$1=_st(binding)._isBindingGroup();
-if(smalltalk.assert($1)){
-return _st(each)._registerConcreteClassesOn_for_(binding,aModel);
-};
-}, function($ctx2) {$ctx2.fillBlock({each:each,binding:binding},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"registerConcreteClassesOn:for:",{aBinding:aBinding,aModel:aModel},smalltalk.HLModelCommand.klass)})},
-args: ["aBinding", "aModel"],
-source: "registerConcreteClassesOn: aBinding for: aModel\x0a\x09self concreteSubclasses do: [ :each | | binding |\x0a\x09\x09binding := each registerOn: aBinding for: aModel.\x0a\x09\x09binding isBindingGroup ifTrue: [\x0a\x09\x09\x09each registerConcreteClassesOn: binding for: aModel ] ]",
-messageSends: ["do:", "registerOn:for:", "ifTrue:", "registerConcreteClassesOn:for:", "isBindingGroup", "concreteSubclasses"],
-referencedClasses: []
-}),
-smalltalk.HLModelCommand.klass);
-
-smalltalk.addMethod(
-"_registerOn_for_",
-smalltalk.method({
-selector: "registerOn:for:",
-category: 'registration',
-fn: function (aBinding,aModel){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(self)._for_(aModel))._registerOn_(aBinding);
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"registerOn:for:",{aBinding:aBinding,aModel:aModel},smalltalk.HLModelCommand.klass)})},
-args: ["aBinding", "aModel"],
-source: "registerOn: aBinding for: aModel\x0a\x09^ (self for: aModel) registerOn: aBinding",
-messageSends: ["registerOn:", "for:"],
-referencedClasses: []
-}),
-smalltalk.HLModelCommand.klass);
-
-
-smalltalk.addClass('HLBrowserCommand', smalltalk.HLModelCommand, [], 'Helios-Commands');
-
-smalltalk.addMethod(
-"_for_",
-smalltalk.method({
-selector: "for:",
-category: 'instance creation',
-fn: function (aBrowserModel){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
-$2=_st(self)._new();
-_st($2)._model_(aBrowserModel);
-$3=_st($2)._yourself();
-$1=$3;
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"for:",{aBrowserModel:aBrowserModel},smalltalk.HLBrowserCommand.klass)})},
-args: ["aBrowserModel"],
-source: "for: aBrowserModel\x0a\x09^ self new\x0a    \x09model: aBrowserModel;\x0a        yourself",
-messageSends: ["model:", "new", "yourself"],
-referencedClasses: []
-}),
-smalltalk.HLBrowserCommand.klass);
-
-
-smalltalk.addClass('HLGoToCommand', smalltalk.HLBrowserCommand, [], 'Helios-Commands');
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (71);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGoToCommand.klass)})},
-args: [],
-source: "key\x0a\x09^ 71",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLGoToCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Go to";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToCommand.klass)})},
-args: [],
-source: "label\x0a\x09^ 'Go to'",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLGoToCommand.klass);
-
-
-smalltalk.addClass('HLGoToClassesCommand', smalltalk.HLGoToCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-category: 'executing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(_st(self)._model())._focusOnClasses();
-return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLGoToClassesCommand)})},
-args: [],
-source: "execute\x0a\x09self model focusOnClasses",
-messageSends: ["focusOnClasses", "model"],
-referencedClasses: []
-}),
-smalltalk.HLGoToClassesCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (67);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGoToClassesCommand.klass)})},
-args: [],
-source: "key\x0a\x09\x22c\x22\x0a    \x0a\x09^ 67",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLGoToClassesCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Classes";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToClassesCommand.klass)})},
-args: [],
-source: "label\x0a\x09^ 'Classes'",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLGoToClassesCommand.klass);
-
-
-smalltalk.addClass('HLGoToMethodsCommand', smalltalk.HLGoToCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-category: 'executing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(_st(self)._model())._focusOnMethods();
-return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLGoToMethodsCommand)})},
-args: [],
-source: "execute\x0a\x09self model focusOnMethods",
-messageSends: ["focusOnMethods", "model"],
-referencedClasses: []
-}),
-smalltalk.HLGoToMethodsCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (77);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGoToMethodsCommand.klass)})},
-args: [],
-source: "key\x0a\x09\x22m\x22\x0a    \x0a\x09^ 77",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLGoToMethodsCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Methods";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToMethodsCommand.klass)})},
-args: [],
-source: "label\x0a\x09^ 'Methods'",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLGoToMethodsCommand.klass);
-
-
-smalltalk.addClass('HLGoToPackagesCommand', smalltalk.HLGoToCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-category: 'executing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(_st(self)._model())._focusOnPackages();
-return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLGoToPackagesCommand)})},
-args: [],
-source: "execute\x0a\x09self model focusOnPackages",
-messageSends: ["focusOnPackages", "model"],
-referencedClasses: []
-}),
-smalltalk.HLGoToPackagesCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (80);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGoToPackagesCommand.klass)})},
-args: [],
-source: "key\x0a\x09\x22p\x22\x0a    \x0a\x09^ 80",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLGoToPackagesCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Packages";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToPackagesCommand.klass)})},
-args: [],
-source: "label\x0a\x09^ 'Packages'",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLGoToPackagesCommand.klass);
-
-
-smalltalk.addClass('HLGoToProtocolsCommand', smalltalk.HLGoToCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-category: 'executing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(_st(self)._model())._focusOnProtocols();
-return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLGoToProtocolsCommand)})},
-args: [],
-source: "execute\x0a\x09self model focusOnProtocols",
-messageSends: ["focusOnProtocols", "model"],
-referencedClasses: []
-}),
-smalltalk.HLGoToProtocolsCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (84);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGoToProtocolsCommand.klass)})},
-args: [],
-source: "key\x0a\x09\x22p\x22\x0a    \x0a\x09^ 84",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLGoToProtocolsCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Protocols";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToProtocolsCommand.klass)})},
-args: [],
-source: "label\x0a\x09^ 'Protocols'",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLGoToProtocolsCommand.klass);
-
-
-smalltalk.addClass('HLGoToSourceCodeCommand', smalltalk.HLGoToCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-category: 'executing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(_st(self)._model())._focusOnSourceCode();
-return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLGoToSourceCodeCommand)})},
-args: [],
-source: "execute\x0a\x09self model focusOnSourceCode",
-messageSends: ["focusOnSourceCode", "model"],
-referencedClasses: []
-}),
-smalltalk.HLGoToSourceCodeCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (83);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGoToSourceCodeCommand.klass)})},
-args: [],
-source: "key\x0a\x09\x22s\x22\x0a    \x0a\x09^ 83",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLGoToSourceCodeCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Source code";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToSourceCodeCommand.klass)})},
-args: [],
-source: "label\x0a\x09^ 'Source code'",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLGoToSourceCodeCommand.klass);
-
-
-smalltalk.addClass('HLMoveToCommand', smalltalk.HLBrowserCommand, [], 'Helios-Commands');
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (77);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLMoveToCommand.klass)})},
-args: [],
-source: "key\x0a\x09^ 77",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLMoveToCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Move";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMoveToCommand.klass)})},
-args: [],
-source: "label\x0a\x09^ 'Move'",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLMoveToCommand.klass);
-
-
-smalltalk.addClass('HLMoveMethodToCommand', smalltalk.HLMoveToCommand, [], 'Helios-Commands');
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (77);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLMoveMethodToCommand.klass)})},
-args: [],
-source: "key\x0a\x09^ 77",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLMoveMethodToCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Method";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMoveMethodToCommand.klass)})},
-args: [],
-source: "label\x0a\x09^ 'Method'",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLMoveMethodToCommand.klass);
-
-
-smalltalk.addClass('HLMoveMethodToClassCommand', smalltalk.HLMoveMethodToCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-category: 'executing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLMoveMethodToClassCommand)})},
-args: [],
-source: "execute",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLMoveMethodToClassCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (67);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLMoveMethodToClassCommand.klass)})},
-args: [],
-source: "key\x0a\x09^ 67",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLMoveMethodToClassCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "to class";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMoveMethodToClassCommand.klass)})},
-args: [],
-source: "label\x09\x0a\x09^ 'to class'",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLMoveMethodToClassCommand.klass);
-
-
-smalltalk.addClass('HLMoveMethodToProtocolCommand', smalltalk.HLMoveMethodToCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-category: 'executing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLMoveMethodToProtocolCommand)})},
-args: [],
-source: "execute",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLMoveMethodToProtocolCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (84);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLMoveMethodToProtocolCommand.klass)})},
-args: [],
-source: "key\x0a\x09^ 84",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLMoveMethodToProtocolCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "to protocol";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMoveMethodToProtocolCommand.klass)})},
-args: [],
-source: "label\x0a\x09^ 'to protocol'",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLMoveMethodToProtocolCommand.klass);
-
-
-smalltalk.addClass('HLToggleCommand', smalltalk.HLBrowserCommand, [], 'Helios-Commands');
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (84);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLToggleCommand.klass)})},
-args: [],
-source: "key\x0a\x09^ 84",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLToggleCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Toggle";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLToggleCommand.klass)})},
-args: [],
-source: "label\x0a\x09^ 'Toggle'",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLToggleCommand.klass);
-
-
-smalltalk.addClass('HLToggleClassSideCommand', smalltalk.HLToggleCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-category: 'executing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(_st(self)._model())._showInstance_(false);
-return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLToggleClassSideCommand)})},
-args: [],
-source: "execute\x0a\x09self model showInstance: false",
-messageSends: ["showInstance:", "model"],
-referencedClasses: []
-}),
-smalltalk.HLToggleClassSideCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (67);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLToggleClassSideCommand.klass)})},
-args: [],
-source: "key\x0a\x09\x22c\x22\x0a    \x0a\x09^ 67",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLToggleClassSideCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Class side";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLToggleClassSideCommand.klass)})},
-args: [],
-source: "label\x0a\x09^ 'Class side'",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLToggleClassSideCommand.klass);
-
-
-smalltalk.addClass('HLToggleInstanceSideCommand', smalltalk.HLToggleCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-category: 'executing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(_st(self)._model())._showInstance_(true);
-return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLToggleInstanceSideCommand)})},
-args: [],
-source: "execute\x0a\x09self model showInstance: true",
-messageSends: ["showInstance:", "model"],
-referencedClasses: []
-}),
-smalltalk.HLToggleInstanceSideCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (73);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLToggleInstanceSideCommand.klass)})},
-args: [],
-source: "key\x0a\x09\x22i\x22\x0a    \x0a\x09^ 73",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLToggleInstanceSideCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Instance side";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLToggleInstanceSideCommand.klass)})},
-args: [],
-source: "label\x0a\x09^ 'Instance side'",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLToggleInstanceSideCommand.klass);
-
-
-smalltalk.addClass('HLOpenCommand', smalltalk.HLCommand, [], 'Helios-Commands');
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (79);
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLOpenCommand.klass)})},
-args: [],
-source: "key\x0a\x09^ 79",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLOpenCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Open";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLOpenCommand.klass)})},
-args: [],
-source: "label\x0a\x09^ 'Open'",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLOpenCommand.klass);
-
-
-smalltalk.addClass('HLOpenBrowserCommand', smalltalk.HLOpenCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-category: 'executing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st((smalltalk.HLBrowser || HLBrowser))._openAsTab();
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"execute",{}, smalltalk.HLOpenBrowserCommand)})},
-args: [],
-source: "execute\x0a\x09^ HLBrowser openAsTab",
-messageSends: ["openAsTab"],
-referencedClasses: ["HLBrowser"]
-}),
-smalltalk.HLOpenBrowserCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (66);
-}, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.HLOpenBrowserCommand.klass)})},
-args: [],
-source: "key\x0a\x09^ 66",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLOpenBrowserCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Browser";
-}, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLOpenBrowserCommand.klass)})},
-args: [],
-source: "label\x0a\x09^ 'Browser'",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLOpenBrowserCommand.klass);
-
-
-smalltalk.addClass('HLOpenTranscriptCommand', smalltalk.HLOpenCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-category: 'executing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st((smalltalk.HLTranscript || HLTranscript))._openAsTab();
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"execute",{}, smalltalk.HLOpenTranscriptCommand)})},
-args: [],
-source: "execute\x0a\x09^ HLTranscript openAsTab",
-messageSends: ["openAsTab"],
-referencedClasses: ["HLTranscript"]
-}),
-smalltalk.HLOpenTranscriptCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (84);
-}, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.HLOpenTranscriptCommand.klass)})},
-args: [],
-source: "key\x0a\x09^ 84",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLOpenTranscriptCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Transcript";
-}, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLOpenTranscriptCommand.klass)})},
-args: [],
-source: "label\x0a\x09^ 'Transcript'",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLOpenTranscriptCommand.klass);
-
-
-smalltalk.addClass('HLOpenWorkspaceCommand', smalltalk.HLOpenCommand, [], 'Helios-Commands');
-smalltalk.addMethod(
-"_execute",
-smalltalk.method({
-selector: "execute",
-category: 'executing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st((smalltalk.HLCodeWidget || HLCodeWidget))._openAsTab();
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLOpenWorkspaceCommand)})},
-args: [],
-source: "execute\x0a\x09^ HLCodeWidget openAsTab",
-messageSends: ["openAsTab"],
-referencedClasses: ["HLCodeWidget"]
-}),
-smalltalk.HLOpenWorkspaceCommand);
-
-
-smalltalk.addMethod(
-"_key",
-smalltalk.method({
-selector: "key",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return (87);
-}, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.HLOpenWorkspaceCommand.klass)})},
-args: [],
-source: "key\x0a\x09^ 87",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLOpenWorkspaceCommand.klass);
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Workspace";
-}, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLOpenWorkspaceCommand.klass)})},
-args: [],
-source: "label\x0a\x09^ 'Workspace'",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLOpenWorkspaceCommand.klass);
-
-
-smalltalk.addClass('HLViewCommand', smalltalk.HLCommand, [], 'Helios-Commands');
-
-smalltalk.addMethod(
-"_label",
-smalltalk.method({
-selector: "label",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "View";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLViewCommand.klass)})},
-args: [],
-source: "label\x0a\x09^ 'View'",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLViewCommand.klass);
-
-
-})(global_smalltalk,global_nil,global__st);

+ 25 - 36
js/Helios-Core.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Core');
+
 smalltalk.addClass('HLModel', smalltalk.Object, ['announcer', 'environment'], 'Helios-Core');
 smalltalk.addMethod(
 smalltalk.method({
@@ -824,7 +825,7 @@ fn: function (aString,aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2;
-_st(_st(window)._jQuery_("#helper"))._remove();
+_st("#helper"._asJQuery())._remove();
 _st((function(html){
 return smalltalk.withContext(function($ctx2) {
 $1=_st(html)._div();
@@ -835,10 +836,10 @@ return $2;
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
 _st(aBlock)._value();
-return _st(_st(window)._jQuery_("#helper"))._remove();
+return _st("#helper"._asJQuery())._remove();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}))._valueWithTimeout_((10));
 return self}, function($ctx1) {$ctx1.fill(self,"withHelperLabelled:do:",{aString:aString,aBlock:aBlock},smalltalk.HLToolModel)})},
-messageSends: ["remove", "jQuery:", "appendToJQuery:", "id:", "div", "with:", "asJQuery", "valueWithTimeout:", "value"]}),
+messageSends: ["remove", "asJQuery", "appendToJQuery:", "id:", "div", "with:", "valueWithTimeout:", "value"]}),
 smalltalk.HLToolModel);
 
 
@@ -1143,17 +1144,6 @@ smalltalk.HLTabWidget.klass);
 
 
 smalltalk.addClass('HLWidget', smalltalk.Widget, ['wrapper'], 'Helios-Core');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "alert:",
-fn: function (aString){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(window)._alert_(aString);
-return self}, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},smalltalk.HLWidget)})},
-messageSends: ["alert:"]}),
-smalltalk.HLWidget);
-
 smalltalk.addMethod(
 smalltalk.method({
 selector: "bindKeyDown:up:",
@@ -1541,9 +1531,9 @@ selector: "activateFirstListItem",
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._activateListItem_(_st(window)._jQuery_(_st(_st(_st(self["@wrapper"])._asJQuery())._find_("li.inactive"))._get_((0))));
+self._activateListItem_(_st(_st(_st(self["@wrapper"])._asJQuery())._find_("li.inactive"))._eq_((0)));
 return self}, function($ctx1) {$ctx1.fill(self,"activateFirstListItem",{},smalltalk.HLListWidget)})},
-messageSends: ["activateListItem:", "jQuery:", "get:", "find:", "asJQuery"]}),
+messageSends: ["activateListItem:", "eq:", "find:", "asJQuery"]}),
 smalltalk.HLListWidget);
 
 smalltalk.addMethod(
@@ -1648,7 +1638,7 @@ smalltalk.method({
 selector: "ensureVisible:",
 fn: function (aListItem){
 var self=this;
-var perent,position;
+var parent,position;
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2;
 position=self._positionOf_(aListItem);
@@ -1661,7 +1651,7 @@ $2=_st(_st(_st(_st(aListItem)._position())._top()).__plus(_st(aListItem)._height
 if(smalltalk.assert($2)){
 _st(_st(parent)._get_((0)))._scrollTop_(_st(_st(_st(_st(_st(parent)._get_((0)))._scrollTop()).__plus(_st(aListItem)._height())).__minus(_st(_st(parent)._height()).__minus(_st(_st(aListItem)._position())._top()))).__plus((10)));
 };
-return self}, function($ctx1) {$ctx1.fill(self,"ensureVisible:",{aListItem:aListItem,perent:perent,position:position},smalltalk.HLListWidget)})},
+return self}, function($ctx1) {$ctx1.fill(self,"ensureVisible:",{aListItem:aListItem,parent:parent,position:position},smalltalk.HLListWidget)})},
 messageSends: ["positionOf:", "parent", "ifTrue:", "<", "top", "position", "scrollTop:", "get:", "-", "+", "scrollTop", ">", "height"]}),
 smalltalk.HLListWidget);
 
@@ -2456,7 +2446,7 @@ if(smalltalk.assert($2)){
 $3=_st($Environment())._new();
 return $3;
 };
-$4=_st(_st(_st(parent)._at_("smalltalk"))._at_("Environment"))._new();
+$4=_st(_st(_st(parent)._at_("global_smalltalk"))._at_("Environment"))._new();
 return $4;
 }, function($ctx1) {$ctx1.fill(self,"defaultEnvironment",{parent:parent},smalltalk.HLManager)})},
 messageSends: ["ifNil:", "opener", "parent", "ifTrue:", "or:", "isNil", "at:", "new"]}),
@@ -2571,10 +2561,10 @@ selector: "refresh",
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(window)._jQuery_(".navbar"))._remove();
+_st(".navbar"._asJQuery())._remove();
 self._appendToJQuery_("body"._asJQuery());
 return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLManager)})},
-messageSends: ["remove", "jQuery:", "appendToJQuery:", "asJQuery"]}),
+messageSends: ["remove", "asJQuery", "appendToJQuery:"]}),
 smalltalk.HLManager);
 
 smalltalk.addMethod(
@@ -2860,7 +2850,7 @@ fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-_st(_st(window)._jQuery_("body"))._keydown_((function(e){
+_st("body"._asJQuery())._keydown_((function(e){
 return smalltalk.withContext(function($ctx2) {
 $1=_st(_st(_st(e)._keyCode()).__gt_eq((37)))._and_((function(){
 return smalltalk.withContext(function($ctx3) {
@@ -2871,7 +2861,7 @@ return false;
 };
 }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"clearKeydownEvent",{},smalltalk.HLManager.klass)})},
-messageSends: ["keydown:", "jQuery:", "ifTrue:", "and:", ">=", "keyCode", "<="]}),
+messageSends: ["keydown:", "asJQuery", "ifTrue:", "and:", ">=", "keyCode", "<="]}),
 smalltalk.HLManager.klass);
 
 smalltalk.addMethod(
@@ -2946,14 +2936,14 @@ selector: "remove",
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(window)._jQuery_(".dialog"))._removeClass_("active");
+_st(".dialog"._asJQuery())._removeClass_("active");
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
-_st(_st(window)._jQuery_("#overlay"))._remove();
-return _st(_st(window)._jQuery_(".dialog"))._remove();
+_st("#overlay"._asJQuery())._remove();
+return _st(".dialog"._asJQuery())._remove();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._valueWithTimeout_((300));
 return self}, function($ctx1) {$ctx1.fill(self,"remove",{},smalltalk.HLModalWidget)})},
-messageSends: ["removeClass:", "jQuery:", "valueWithTimeout:", "remove"]}),
+messageSends: ["removeClass:", "asJQuery", "valueWithTimeout:", "remove"]}),
 smalltalk.HLModalWidget);
 
 smalltalk.addMethod(
@@ -2984,10 +2974,10 @@ _st($3)._renderMainOn_(html);
 $4=_st($3)._renderButtonsOn_(html);
 return $4;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-_st(_st(window)._jQuery_(".dialog"))._addClass_("active");
+_st(".dialog"._asJQuery())._addClass_("active");
 self._setupKeyBindings();
 return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html,confirmButton:confirmButton},smalltalk.HLModalWidget)})},
-messageSends: ["id:", "div", "class:", ",", "cssClass", "with:", "renderMainOn:", "renderButtonsOn:", "addClass:", "jQuery:", "setupKeyBindings"]}),
+messageSends: ["id:", "div", "class:", ",", "cssClass", "with:", "renderMainOn:", "renderButtonsOn:", "addClass:", "asJQuery", "setupKeyBindings"]}),
 smalltalk.HLModalWidget);
 
 smalltalk.addMethod(
@@ -3007,7 +2997,7 @@ fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-_st(_st(window)._jQuery_(".dialog"))._keyup_((function(e){
+_st(".dialog"._asJQuery())._keyup_((function(e){
 return smalltalk.withContext(function($ctx2) {
 $1=_st(_st(e)._keyCode()).__eq((27));
 if(smalltalk.assert($1)){
@@ -3015,7 +3005,7 @@ return self._cancel();
 };
 }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},smalltalk.HLModalWidget)})},
-messageSends: ["keyup:", "jQuery:", "ifTrue:", "=", "keyCode", "cancel"]}),
+messageSends: ["keyup:", "asJQuery", "ifTrue:", "=", "keyCode", "cancel"]}),
 smalltalk.HLModalWidget);
 
 
@@ -3142,14 +3132,14 @@ selector: "remove",
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(window)._jQuery_(".dialog"))._removeClass_("active");
+_st(".dialog"._asJQuery())._removeClass_("active");
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
-_st(_st(window)._jQuery_("#overlay"))._remove();
-return _st(_st(window)._jQuery_(".dialog"))._remove();
+_st("#overlay"._asJQuery())._remove();
+return _st(".dialog"._asJQuery())._remove();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._valueWithTimeout_((300));
 return self}, function($ctx1) {$ctx1.fill(self,"remove",{},smalltalk.HLConfirmationWidget)})},
-messageSends: ["removeClass:", "jQuery:", "valueWithTimeout:", "remove"]}),
+messageSends: ["removeClass:", "asJQuery", "valueWithTimeout:", "remove"]}),
 smalltalk.HLConfirmationWidget);
 
 smalltalk.addMethod(
@@ -3699,5 +3689,4 @@ return (1000);
 messageSends: []}),
 smalltalk.HLSUnit.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 38 - 54
js/Helios-Core.js

@@ -1,7 +1,8 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Core');
+
 smalltalk.addClass('HLModel', smalltalk.Object, ['announcer', 'environment'], 'Helios-Core');
-smalltalk.HLModel.comment="I am the abstract superclass of all models of Helios.\x0aI am the \x22Model\x22 part of the MVC pattern implementation in Helios.\x0a\x0aI provide access to an `Environment` object and both a local (model-specific) and global (system-specific) announcer.\x0a\x0aThe `#withChangesDo:` method is handy for performing model changes ensuring that all widgets are aware of the change and can prevent it from happening.\x0a\x0aModifications of the system should be done via commands (see `HLCommand` and subclasses).\x0a\x0a";
+smalltalk.HLModel.comment="I am the abstract superclass of all models of Helios.\x0aI am the \x22Model\x22 part of the MVC pattern implementation in Helios.\x0a\x0aI provide access to an `Environment` object and both a local (model-specific) and global (system-specific) announcer.\x0a\x0aThe `#withChangesDo:` method is handy for performing model changes ensuring that all widgets are aware of the change and can prevent it from happening.\x0a\x0aModifications of the system should be done via commands (see `HLCommand` and subclasses).";
 smalltalk.addMethod(
 smalltalk.method({
 selector: "announcer",
@@ -1072,7 +1073,7 @@ fn: function (aString,aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2;
-_st(_st(window)._jQuery_("#helper"))._remove();
+_st("#helper"._asJQuery())._remove();
 _st((function(html){
 return smalltalk.withContext(function($ctx2) {
 $1=_st(html)._div();
@@ -1083,12 +1084,12 @@ return $2;
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
 _st(aBlock)._value();
-return _st(_st(window)._jQuery_("#helper"))._remove();
+return _st("#helper"._asJQuery())._remove();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}))._valueWithTimeout_((10));
 return self}, function($ctx1) {$ctx1.fill(self,"withHelperLabelled:do:",{aString:aString,aBlock:aBlock},smalltalk.HLToolModel)})},
 args: ["aString", "aBlock"],
-source: "withHelperLabelled: aString do: aBlock\x0a\x09\x22TODO: doesn't belong here\x22\x0a\x0a\x09(window jQuery: '#helper') remove.\x0a\x0a\x09[ :html |\x0a\x09\x09html div \x0a\x09\x09\x09id: 'helper';\x0a\x09\x09\x09with: aString ] appendToJQuery: 'body' asJQuery.\x0a\x09\x0a\x09[\x0a\x09\x09aBlock value.\x0a\x09\x09(window jQuery: '#helper') remove\x0a\x09] \x0a\x09\x09valueWithTimeout: 10",
-messageSends: ["remove", "jQuery:", "appendToJQuery:", "id:", "div", "with:", "asJQuery", "valueWithTimeout:", "value"],
+source: "withHelperLabelled: aString do: aBlock\x0a\x09\x22TODO: doesn't belong here\x22\x0a\x0a\x09'#helper' asJQuery remove.\x0a\x0a\x09[ :html |\x0a\x09\x09html div \x0a\x09\x09\x09id: 'helper';\x0a\x09\x09\x09with: aString ] appendToJQuery: 'body' asJQuery.\x0a\x09\x0a\x09[\x0a\x09\x09aBlock value.\x0a\x09\x09'#helper' asJQuery remove\x0a\x09] \x0a\x09\x09valueWithTimeout: 10",
+messageSends: ["remove", "asJQuery", "appendToJQuery:", "id:", "div", "with:", "valueWithTimeout:", "value"],
 referencedClasses: []
 }),
 smalltalk.HLToolModel);
@@ -1498,22 +1499,6 @@ smalltalk.HLTabWidget.klass);
 
 smalltalk.addClass('HLWidget', smalltalk.Widget, ['wrapper'], 'Helios-Core');
 smalltalk.HLWidget.comment="I am the abstract superclass of all Helios widgets.\x0a\x0aI provide common methods, additional behavior to widgets useful for Helios, like dialog creation, command execution and tab creation.\x0a\x0a## API\x0a\x0a1. Rendering\x0a\x0a    Instead of overriding `#renderOn:` as with other Widget subclasses, my subclasses should override `#renderContentOn:`.\x0a\x0a2. Refreshing\x0a\x0a    To re-render a widget, use `#refresh`.\x0a\x0a3. Key bindings registration and tabs\x0a\x0a    When displayed as a tab, the widget has a chance to register keybindings with the `#registerBindingsOn:` hook method.\x0a    \x0a4. Unregistration\x0a\x0a    When a widget has subscribed to announcements or other actions that need to be cleared when closing the tab, the hook method `#unregister` will be called by helios.\x0a\x0a5. Tabs\x0a\x0a   To enable a widget class to be open as a tab, override the class-side `#canBeOpenAsTab` method to answer `true`. `#tabClass` and `#tabPriority` can be overridden too to respectively change the css class of the tab and the order of tabs in the main menu.\x0a\x0a6. Command execution\x0a\x0a    An helios command (instance of `HLCommand` or one of its subclass) can be executed with `#execute:`.";
-smalltalk.addMethod(
-smalltalk.method({
-selector: "alert:",
-category: 'actions',
-fn: function (aString){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(window)._alert_(aString);
-return self}, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},smalltalk.HLWidget)})},
-args: ["aString"],
-source: "alert: aString\x0a\x09window alert: aString",
-messageSends: ["alert:"],
-referencedClasses: []
-}),
-smalltalk.HLWidget);
-
 smalltalk.addMethod(
 smalltalk.method({
 selector: "bindKeyDown:up:",
@@ -1527,7 +1512,7 @@ _st($1)._keydown_(keyDownBlock);
 $2=_st($1)._keyup_(keyUpBlock);
 return self}, function($ctx1) {$ctx1.fill(self,"bindKeyDown:up:",{keyDownBlock:keyDownBlock,keyUpBlock:keyUpBlock},smalltalk.HLWidget)})},
 args: ["keyDownBlock", "keyUpBlock"],
-source: "bindKeyDown: keyDownBlock up: keyUpBlock\x0a\x09self wrapper asJQuery\x0a\x09\x09keydown: keyDownBlock;\x0a\x09\x09keyup: keyUpBlock ",
+source: "bindKeyDown: keyDownBlock up: keyUpBlock\x0a\x09self wrapper asJQuery\x0a\x09\x09keydown: keyDownBlock;\x0a\x09\x09keyup: keyUpBlock",
 messageSends: ["keydown:", "asJQuery", "wrapper", "keyup:"],
 referencedClasses: []
 }),
@@ -2048,11 +2033,11 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._activateListItem_(_st(window)._jQuery_(_st(_st(_st(self["@wrapper"])._asJQuery())._find_("li.inactive"))._get_((0))));
+self._activateListItem_(_st(_st(_st(self["@wrapper"])._asJQuery())._find_("li.inactive"))._eq_((0)));
 return self}, function($ctx1) {$ctx1.fill(self,"activateFirstListItem",{},smalltalk.HLListWidget)})},
 args: [],
-source: "activateFirstListItem\x0a\x09self activateListItem: (window jQuery: ((wrapper asJQuery find: 'li.inactive') get: 0))",
-messageSends: ["activateListItem:", "jQuery:", "get:", "find:", "asJQuery"],
+source: "activateFirstListItem\x0a\x09self activateListItem: ((wrapper asJQuery find: 'li.inactive') eq: 0)",
+messageSends: ["activateListItem:", "eq:", "find:", "asJQuery"],
 referencedClasses: []
 }),
 smalltalk.HLListWidget);
@@ -2190,7 +2175,7 @@ selector: "ensureVisible:",
 category: 'actions',
 fn: function (aListItem){
 var self=this;
-var perent,position;
+var parent,position;
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2;
 position=self._positionOf_(aListItem);
@@ -2203,9 +2188,9 @@ $2=_st(_st(_st(_st(aListItem)._position())._top()).__plus(_st(aListItem)._height
 if(smalltalk.assert($2)){
 _st(_st(parent)._get_((0)))._scrollTop_(_st(_st(_st(_st(_st(parent)._get_((0)))._scrollTop()).__plus(_st(aListItem)._height())).__minus(_st(_st(parent)._height()).__minus(_st(_st(aListItem)._position())._top()))).__plus((10)));
 };
-return self}, function($ctx1) {$ctx1.fill(self,"ensureVisible:",{aListItem:aListItem,perent:perent,position:position},smalltalk.HLListWidget)})},
+return self}, function($ctx1) {$ctx1.fill(self,"ensureVisible:",{aListItem:aListItem,parent:parent,position:position},smalltalk.HLListWidget)})},
 args: ["aListItem"],
-source: "ensureVisible: aListItem\x09\x0a\x09\x22Move the scrollbar to show the active element\x22\x0a\x09\x0a\x09| perent position |\x0a\x09\x0a\x09position := self positionOf: aListItem.\x0a\x09parent := aListItem parent.\x0a\x09\x0a    aListItem position top < 0 ifTrue: [\x0a\x09\x09(parent get: 0) scrollTop: ((parent get: 0) scrollTop + aListItem position top - 10) ].\x0a    aListItem position top + aListItem height > parent height ifTrue: [ \x0a\x09\x09(parent get: 0) scrollTop: ((parent get: 0) scrollTop + aListItem height - (parent height - aListItem position top)) +10 ]",
+source: "ensureVisible: aListItem\x09\x0a\x09\x22Move the scrollbar to show the active element\x22\x0a\x09\x0a\x09| parent position |\x0a\x09\x0a\x09position := self positionOf: aListItem.\x0a\x09parent := aListItem parent.\x0a\x09\x0a    aListItem position top < 0 ifTrue: [\x0a\x09\x09(parent get: 0) scrollTop: ((parent get: 0) scrollTop + aListItem position top - 10) ].\x0a    aListItem position top + aListItem height > parent height ifTrue: [ \x0a\x09\x09(parent get: 0) scrollTop: ((parent get: 0) scrollTop + aListItem height - (parent height - aListItem position top)) +10 ]",
 messageSends: ["positionOf:", "parent", "ifTrue:", "<", "top", "position", "scrollTop:", "get:", "-", "+", "scrollTop", ">", "height"],
 referencedClasses: []
 }),
@@ -3238,11 +3223,11 @@ if(smalltalk.assert($2)){
 $3=_st($Environment())._new();
 return $3;
 };
-$4=_st(_st(_st(parent)._at_("smalltalk"))._at_("Environment"))._new();
+$4=_st(_st(_st(parent)._at_("global_smalltalk"))._at_("Environment"))._new();
 return $4;
 }, function($ctx1) {$ctx1.fill(self,"defaultEnvironment",{parent:parent},smalltalk.HLManager)})},
 args: [],
-source: "defaultEnvironment\x0a\x09\x22If helios is loaded from within a frame, answer the parent window environment\x22\x0a\x09\x0a\x09| parent |\x0a\x09\x0a\x09parent := window opener ifNil: [ window parent ].\x0a\x0a\x09(parent isNil or: [ (parent at: 'smalltalk') isNil ])\x0a\x09\x09ifTrue: [ ^ Environment new ].\x0a\x09\x0a\x09^ ((parent at: 'smalltalk')\x0a\x09\x09at: 'Environment') new",
+source: "defaultEnvironment\x0a\x09\x22If helios is loaded from within a frame, answer the parent window environment\x22\x0a\x09\x0a\x09| parent |\x0a\x09\x0a\x09parent := window opener ifNil: [ window parent ].\x0a\x0a\x09(parent isNil or: [ (parent at: 'smalltalk') isNil ])\x0a\x09\x09ifTrue: [ ^ Environment new ].\x0a\x09\x0a\x09^ ((parent at: 'global_smalltalk')\x0a\x09\x09at: 'Environment') new",
 messageSends: ["ifNil:", "opener", "parent", "ifTrue:", "or:", "isNil", "at:", "new"],
 referencedClasses: ["Environment"]
 }),
@@ -3388,12 +3373,12 @@ category: 'rendering',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(window)._jQuery_(".navbar"))._remove();
+_st(".navbar"._asJQuery())._remove();
 self._appendToJQuery_("body"._asJQuery());
 return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLManager)})},
 args: [],
-source: "refresh\x0a\x09(window jQuery: '.navbar') remove.\x0a\x09self appendToJQuery: 'body' asJQuery",
-messageSends: ["remove", "jQuery:", "appendToJQuery:", "asJQuery"],
+source: "refresh\x0a\x09'.navbar' asJQuery remove.\x0a\x09self appendToJQuery: 'body' asJQuery",
+messageSends: ["remove", "asJQuery", "appendToJQuery:"],
 referencedClasses: []
 }),
 smalltalk.HLManager);
@@ -3747,7 +3732,7 @@ fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-_st(_st(window)._jQuery_("body"))._keydown_((function(e){
+_st("body"._asJQuery())._keydown_((function(e){
 return smalltalk.withContext(function($ctx2) {
 $1=_st(_st(_st(e)._keyCode()).__gt_eq((37)))._and_((function(){
 return smalltalk.withContext(function($ctx3) {
@@ -3759,8 +3744,8 @@ return false;
 }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"clearKeydownEvent",{},smalltalk.HLManager.klass)})},
 args: [],
-source: "clearKeydownEvent\x0a\x09\x22Prevent default keydown event with arrow key from scrolling the parent page\x0a\x09when helios is run inside a frame.\x22\x0a\x09\x0a\x09(window jQuery: 'body') keydown: [ :e | \x0a\x09\x09(e keyCode >= 37 and: [ e keyCode <= 40 ])\x0a\x09\x09\x09ifTrue: [ false ] ]",
-messageSends: ["keydown:", "jQuery:", "ifTrue:", "and:", ">=", "keyCode", "<="],
+source: "clearKeydownEvent\x0a\x09\x22Prevent default keydown event with arrow key from scrolling the parent page\x0a\x09when helios is run inside a frame.\x22\x0a\x09\x0a\x09'body' asJQuery keydown: [ :e | \x0a\x09\x09(e keyCode >= 37 and: [ e keyCode <= 40 ])\x0a\x09\x09\x09ifTrue: [ false ] ]",
+messageSends: ["keydown:", "asJQuery", "ifTrue:", "and:", ">=", "keyCode", "<="],
 referencedClasses: []
 }),
 smalltalk.HLManager.klass);
@@ -3864,16 +3849,16 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(window)._jQuery_(".dialog"))._removeClass_("active");
+_st(".dialog"._asJQuery())._removeClass_("active");
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
-_st(_st(window)._jQuery_("#overlay"))._remove();
-return _st(_st(window)._jQuery_(".dialog"))._remove();
+_st("#overlay"._asJQuery())._remove();
+return _st(".dialog"._asJQuery())._remove();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._valueWithTimeout_((300));
 return self}, function($ctx1) {$ctx1.fill(self,"remove",{},smalltalk.HLModalWidget)})},
 args: [],
-source: "remove\x0a\x09(window jQuery: '.dialog') removeClass: 'active'.\x0a\x09[ \x0a\x09\x09(window jQuery: '#overlay') remove.\x0a\x09\x09(window jQuery: '.dialog') remove\x0a\x09] valueWithTimeout: 300",
-messageSends: ["removeClass:", "jQuery:", "valueWithTimeout:", "remove"],
+source: "remove\x0a\x09'.dialog' asJQuery removeClass: 'active'.\x0a\x09[ \x0a\x09\x09'#overlay' asJQuery remove.\x0a\x09\x09'.dialog' asJQuery remove\x0a\x09] valueWithTimeout: 300",
+messageSends: ["removeClass:", "asJQuery", "valueWithTimeout:", "remove"],
 referencedClasses: []
 }),
 smalltalk.HLModalWidget);
@@ -3887,7 +3872,7 @@ var self=this;
 return smalltalk.withContext(function($ctx1) { 
 return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLModalWidget)})},
 args: ["html"],
-source: "renderButtonsOn: html\x0a\x09",
+source: "renderButtonsOn: html",
 messageSends: [],
 referencedClasses: []
 }),
@@ -3912,12 +3897,12 @@ _st($3)._renderMainOn_(html);
 $4=_st($3)._renderButtonsOn_(html);
 return $4;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-_st(_st(window)._jQuery_(".dialog"))._addClass_("active");
+_st(".dialog"._asJQuery())._addClass_("active");
 self._setupKeyBindings();
 return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html,confirmButton:confirmButton},smalltalk.HLModalWidget)})},
 args: ["html"],
-source: "renderContentOn: html\x0a\x09| confirmButton |\x0a\x09\x0a\x09html div id: 'overlay'.\x0a\x09html div \x0a\x09\x09class: 'dialog ', self cssClass;\x0a\x09\x09with: [\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09renderMainOn: html;\x0a\x09\x09\x09\x09renderButtonsOn: html ].\x0a\x0a\x09(window jQuery: '.dialog') addClass: 'active'.\x0a\x09self setupKeyBindings",
-messageSends: ["id:", "div", "class:", ",", "cssClass", "with:", "renderMainOn:", "renderButtonsOn:", "addClass:", "jQuery:", "setupKeyBindings"],
+source: "renderContentOn: html\x0a\x09| confirmButton |\x0a\x09\x0a\x09html div id: 'overlay'.\x0a\x09html div \x0a\x09\x09class: 'dialog ', self cssClass;\x0a\x09\x09with: [\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09renderMainOn: html;\x0a\x09\x09\x09\x09renderButtonsOn: html ].\x0a\x0a\x09'.dialog' asJQuery addClass: 'active'.\x0a\x09self setupKeyBindings",
+messageSends: ["id:", "div", "class:", ",", "cssClass", "with:", "renderMainOn:", "renderButtonsOn:", "addClass:", "asJQuery", "setupKeyBindings"],
 referencedClasses: []
 }),
 smalltalk.HLModalWidget);
@@ -3945,7 +3930,7 @@ fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-_st(_st(window)._jQuery_(".dialog"))._keyup_((function(e){
+_st(".dialog"._asJQuery())._keyup_((function(e){
 return smalltalk.withContext(function($ctx2) {
 $1=_st(_st(e)._keyCode()).__eq((27));
 if(smalltalk.assert($1)){
@@ -3954,8 +3939,8 @@ return self._cancel();
 }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},smalltalk.HLModalWidget)})},
 args: [],
-source: "setupKeyBindings\x0a\x09(window jQuery: '.dialog') keyup: [ :e |\x0a\x09\x09e keyCode = 27 ifTrue: [ self cancel ] ]",
-messageSends: ["keyup:", "jQuery:", "ifTrue:", "=", "keyCode", "cancel"],
+source: "setupKeyBindings\x0a\x09'.dialog' asJQuery keyup: [ :e |\x0a\x09\x09e keyCode = 27 ifTrue: [ self cancel ] ]",
+messageSends: ["keyup:", "asJQuery", "ifTrue:", "=", "keyCode", "cancel"],
 referencedClasses: []
 }),
 smalltalk.HLModalWidget);
@@ -4126,16 +4111,16 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(window)._jQuery_(".dialog"))._removeClass_("active");
+_st(".dialog"._asJQuery())._removeClass_("active");
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
-_st(_st(window)._jQuery_("#overlay"))._remove();
-return _st(_st(window)._jQuery_(".dialog"))._remove();
+_st("#overlay"._asJQuery())._remove();
+return _st(".dialog"._asJQuery())._remove();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._valueWithTimeout_((300));
 return self}, function($ctx1) {$ctx1.fill(self,"remove",{},smalltalk.HLConfirmationWidget)})},
 args: [],
-source: "remove\x0a\x09(window jQuery: '.dialog') removeClass: 'active'.\x0a\x09[ \x0a\x09\x09(window jQuery: '#overlay') remove.\x0a\x09\x09(window jQuery: '.dialog') remove\x0a\x09] valueWithTimeout: 300",
-messageSends: ["removeClass:", "jQuery:", "valueWithTimeout:", "remove"],
+source: "remove\x0a\x09'.dialog' asJQuery removeClass: 'active'.\x0a\x09[ \x0a\x09\x09'#overlay' asJQuery remove.\x0a\x09\x09'.dialog' asJQuery remove\x0a\x09] valueWithTimeout: 300",
+messageSends: ["removeClass:", "asJQuery", "valueWithTimeout:", "remove"],
 referencedClasses: []
 }),
 smalltalk.HLConfirmationWidget);
@@ -4870,5 +4855,4 @@ referencedClasses: []
 }),
 smalltalk.HLSUnit.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Helios-Debugger.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Debugger');
+
 smalltalk.addClass('HLContextInspectorDecorator', smalltalk.Object, ['context'], 'Helios-Debugger');
 smalltalk.addMethod(
 smalltalk.method({
@@ -772,5 +773,4 @@ messageSends: ["where", "model"]}),
 smalltalk.HLStackListWidget);
 
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Helios-Debugger.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Debugger');
+
 smalltalk.addClass('HLContextInspectorDecorator', smalltalk.Object, ['context'], 'Helios-Debugger');
 smalltalk.addMethod(
 smalltalk.method({
@@ -1014,5 +1015,4 @@ referencedClasses: []
 smalltalk.HLStackListWidget);
 
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Helios-Exceptions.deploy.js

@@ -1,9 +1,9 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Exceptions');
+
 smalltalk.addClass('HLError', smalltalk.Error, [], 'Helios-Exceptions');
 
 
 smalltalk.addClass('HLChangeForbidden', smalltalk.HLError, [], 'Helios-Exceptions');
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Helios-Exceptions.js

@@ -1,9 +1,9 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Exceptions');
+
 smalltalk.addClass('HLError', smalltalk.Error, [], 'Helios-Exceptions');
 
 
 smalltalk.addClass('HLChangeForbidden', smalltalk.HLError, [], 'Helios-Exceptions');
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Helios-Inspector.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Inspector');
+
 smalltalk.addClass('HLInspectorDisplayWidget', smalltalk.HLNavigationListWidget, ['model'], 'Helios-Inspector');
 smalltalk.addMethod(
 smalltalk.method({
@@ -1058,5 +1059,4 @@ return self}, function($ctx1) {$ctx1.fill(self,"watchChanges",{},smalltalk.HLIns
 messageSends: ["valueWithInterval:", "do:", "inspectors", "refresh"]}),
 smalltalk.HLInspector.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 13 - 13
js/Helios-Inspector.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Inspector');
+
 smalltalk.addClass('HLInspectorDisplayWidget', smalltalk.HLNavigationListWidget, ['model'], 'Helios-Inspector');
 smalltalk.addMethod(
 smalltalk.method({
@@ -45,7 +46,7 @@ return smalltalk.withContext(function($ctx1) {
 _st(_st(html)._div())._with_(self._selectionDisplayString());
 return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLInspectorDisplayWidget)})},
 args: ["html"],
-source: "renderContentOn: html\x0a\x09\x0a    html div with: self selectionDisplayString\x0a    ",
+source: "renderContentOn: html\x0a\x09\x0a    html div with: self selectionDisplayString",
 messageSends: ["with:", "div", "selectionDisplayString"],
 referencedClasses: []
 }),
@@ -181,7 +182,7 @@ self["@variables"]=[];
 _st(self["@inspectee"])._inspectOn_(anInspector);
 return self}, function($ctx1) {$ctx1.fill(self,"inspect:on:",{anObject:anObject,anInspector:anInspector},smalltalk.HLInspectorModel)})},
 args: ["anObject", "anInspector"],
-source: "inspect: anObject on: anInspector\x0a\x09inspectee := anObject.\x0a\x09variables := #().\x0a\x09inspectee inspectOn: anInspector    ",
+source: "inspect: anObject on: anInspector\x0a\x09inspectee := anObject.\x0a\x09variables := #().\x0a\x09inspectee inspectOn: anInspector",
 messageSends: ["inspectOn:"],
 referencedClasses: []
 }),
@@ -199,7 +200,7 @@ $1=self["@inspectee"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"inspectee",{},smalltalk.HLInspectorModel)})},
 args: [],
-source: "inspectee \x0a\x09^ inspectee ",
+source: "inspectee \x0a\x09^ inspectee",
 messageSends: [],
 referencedClasses: []
 }),
@@ -215,7 +216,7 @@ return smalltalk.withContext(function($ctx1) {
 self["@inspectee"]=anObject;
 return self}, function($ctx1) {$ctx1.fill(self,"inspectee:",{anObject:anObject},smalltalk.HLInspectorModel)})},
 args: ["anObject"],
-source: "inspectee: anObject \x0a\x09inspectee := anObject\x0a    ",
+source: "inspectee: anObject \x0a\x09inspectee := anObject",
 messageSends: [],
 referencedClasses: []
 }),
@@ -338,7 +339,7 @@ $1=self._instVarObjectAt_(self._selection());
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"selectedInstVarObject",{},smalltalk.HLInspectorModel)})},
 args: [],
-source: "selectedInstVarObject\x0a\x09^ self instVarObjectAt: self selection\x0a    ",
+source: "selectedInstVarObject\x0a\x09^ self instVarObjectAt: self selection",
 messageSends: ["instVarObjectAt:", "selection"],
 referencedClasses: []
 }),
@@ -361,7 +362,7 @@ $1=$2;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"selection",{},smalltalk.HLInspectorModel)})},
 args: [],
-source: "selection\x0a\x09^ selection ifNil:[ '' ] ",
+source: "selection\x0a\x09^ selection ifNil:[ '' ]",
 messageSends: ["ifNil:"],
 referencedClasses: []
 }),
@@ -379,7 +380,7 @@ self["@selection"]=anObject;
 _st(self._announcer())._announce_(_st($HLInstanceVariableSelected())._on_(self["@selection"]));
 return self}, function($ctx1) {$ctx1.fill(self,"selection:",{anObject:anObject},smalltalk.HLInspectorModel)})},
 args: ["anObject"],
-source: "selection: anObject\x0a\x09selection := anObject.\x0a\x0a\x09self announcer announce: (HLInstanceVariableSelected on: selection)\x0a    ",
+source: "selection: anObject\x0a\x09selection := anObject.\x0a\x0a\x09self announcer announce: (HLInstanceVariableSelected on: selection)",
 messageSends: ["announce:", "announcer", "on:"],
 referencedClasses: ["HLInstanceVariableSelected"]
 }),
@@ -435,7 +436,7 @@ return smalltalk.withContext(function($ctx1) {
 self["@variables"]=aCollection;
 return self}, function($ctx1) {$ctx1.fill(self,"variables:",{aCollection:aCollection},smalltalk.HLInspectorModel)})},
 args: ["aCollection"],
-source: "variables: aCollection\x0a\x09variables := aCollection\x0a    ",
+source: "variables: aCollection\x0a\x09variables := aCollection",
 messageSends: [],
 referencedClasses: []
 }),
@@ -538,7 +539,7 @@ $1=self["@model"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLInspectorVariablesWidget)})},
 args: [],
-source: "model\x0a    ^ model\x0a        ",
+source: "model\x0a    ^ model",
 messageSends: [],
 referencedClasses: []
 }),
@@ -554,7 +555,7 @@ return smalltalk.withContext(function($ctx1) {
 self["@model"]=aModel;
 return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLInspectorVariablesWidget)})},
 args: ["aModel"],
-source: "model: aModel\x0a    model := aModel\x0a        ",
+source: "model: aModel\x0a    model := aModel",
 messageSends: [],
 referencedClasses: []
 }),
@@ -958,7 +959,7 @@ return self._onDive();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"observeVariablesWidget",{},smalltalk.HLInspectorWidget)})},
 args: [],
-source: "observeVariablesWidget\x0a\x09self variablesWidget announcer \x0a        on: HLDiveRequested do:[ self onDive ]\x0a        ",
+source: "observeVariablesWidget\x0a\x09self variablesWidget announcer \x0a        on: HLDiveRequested do:[ self onDive ]",
 messageSends: ["on:do:", "announcer", "variablesWidget", "onDive"],
 referencedClasses: ["HLDiveRequested"]
 }),
@@ -1124,7 +1125,7 @@ return smalltalk.withContext(function($ctx1) {
 _st(html)._with_(_st($HLHorizontalSplitter())._with_with_(_st($HLVerticalSplitter())._with_with_(self._variablesWidget(),self._displayWidget()),self._codeWidget()));
 return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLInspectorWidget)})},
 args: ["html"],
-source: "renderContentOn: html\x0a   \x09html with: (HLHorizontalSplitter\x0a    \x09with: (HLVerticalSplitter \x0a            with: self variablesWidget\x0a            with: self displayWidget)\x0a        with: self codeWidget)\x0a ",
+source: "renderContentOn: html\x0a   \x09html with: (HLHorizontalSplitter\x0a    \x09with: (HLVerticalSplitter \x0a            with: self variablesWidget\x0a            with: self displayWidget)\x0a        with: self codeWidget)",
 messageSends: ["with:", "with:with:", "variablesWidget", "displayWidget", "codeWidget"],
 referencedClasses: ["HLHorizontalSplitter", "HLVerticalSplitter"]
 }),
@@ -1428,5 +1429,4 @@ referencedClasses: []
 }),
 smalltalk.HLInspector.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 6 - 6
js/Helios-KeyBindings.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-KeyBindings');
+
 smalltalk.addClass('HLBinding', smalltalk.Object, ['key', 'label'], 'Helios-KeyBindings');
 smalltalk.addMethod(
 smalltalk.method({
@@ -1168,12 +1169,12 @@ selector: "setupEvents",
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(window)._jQuery_("body"))._keydown_((function(event){
+_st("body"._asJQuery())._keydown_((function(event){
 return smalltalk.withContext(function($ctx2) {
 return self._handleKeyDown_(event);
 }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"setupEvents",{},smalltalk.HLKeyBinder)})},
-messageSends: ["keydown:", "jQuery:", "handleKeyDown:"]}),
+messageSends: ["keydown:", "asJQuery", "handleKeyDown:"]}),
 smalltalk.HLKeyBinder);
 
 smalltalk.addMethod(
@@ -1388,7 +1389,7 @@ fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2;
-_st(_st(window)._jQuery_("#helper"))._remove();
+_st("#helper"._asJQuery())._remove();
 _st((function(html){
 return smalltalk.withContext(function($ctx2) {
 $1=_st(html)._div();
@@ -1398,10 +1399,10 @@ return $2;
 }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}))._appendToJQuery_("body"._asJQuery());
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(window)._jQuery_("#helper"))._fadeOut_((1000));
+return _st("#helper"._asJQuery())._fadeOut_((1000));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}))._valueWithTimeout_((2000));
 return self}, function($ctx1) {$ctx1.fill(self,"renderStart",{},smalltalk.HLKeyBinderHelper)})},
-messageSends: ["remove", "jQuery:", "appendToJQuery:", "id:", "div", "with:", ",", "activationKeyLabel", "keyBinder", "asJQuery", "valueWithTimeout:", "fadeOut:"]}),
+messageSends: ["remove", "asJQuery", "appendToJQuery:", "id:", "div", "with:", ",", "activationKeyLabel", "keyBinder", "valueWithTimeout:", "fadeOut:"]}),
 smalltalk.HLKeyBinderHelper);
 
 smalltalk.addMethod(
@@ -1688,5 +1689,4 @@ return $1;
 messageSends: ["widget:", "new", "yourself"]}),
 smalltalk.HLRepeatingKeyBindingHandler.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 9 - 9
js/Helios-KeyBindings.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-KeyBindings');
+
 smalltalk.addClass('HLBinding', smalltalk.Object, ['key', 'label'], 'Helios-KeyBindings');
 smalltalk.addMethod(
 smalltalk.method({
@@ -1539,14 +1540,14 @@ category: 'events',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(window)._jQuery_("body"))._keydown_((function(event){
+_st("body"._asJQuery())._keydown_((function(event){
 return smalltalk.withContext(function($ctx2) {
 return self._handleKeyDown_(event);
 }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"setupEvents",{},smalltalk.HLKeyBinder)})},
 args: [],
-source: "setupEvents\x0a\x09(window jQuery: 'body') keydown: [ :event | self handleKeyDown: event ]",
-messageSends: ["keydown:", "jQuery:", "handleKeyDown:"],
+source: "setupEvents\x0a\x09'body' asJQuery keydown: [ :event | self handleKeyDown: event ]",
+messageSends: ["keydown:", "asJQuery", "handleKeyDown:"],
 referencedClasses: []
 }),
 smalltalk.HLKeyBinder);
@@ -1829,7 +1830,7 @@ fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2;
-_st(_st(window)._jQuery_("#helper"))._remove();
+_st("#helper"._asJQuery())._remove();
 _st((function(html){
 return smalltalk.withContext(function($ctx2) {
 $1=_st(html)._div();
@@ -1839,12 +1840,12 @@ return $2;
 }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}))._appendToJQuery_("body"._asJQuery());
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(window)._jQuery_("#helper"))._fadeOut_((1000));
+return _st("#helper"._asJQuery())._fadeOut_((1000));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}))._valueWithTimeout_((2000));
 return self}, function($ctx1) {$ctx1.fill(self,"renderStart",{},smalltalk.HLKeyBinderHelper)})},
 args: [],
-source: "renderStart\x0a\x09(window jQuery: '#helper') remove.\x0a\x0a\x09[ :html |\x0a\x09\x09html div \x0a\x09\x09\x09id: 'helper';\x0a\x09\x09\x09with: 'Press ', self keyBinder activationKeyLabel, ' to start' ] appendToJQuery: 'body' asJQuery.\x0a\x09\x0a\x09[ (window jQuery: '#helper') fadeOut: 1000 ] \x0a\x09\x09valueWithTimeout: 2000",
-messageSends: ["remove", "jQuery:", "appendToJQuery:", "id:", "div", "with:", ",", "activationKeyLabel", "keyBinder", "asJQuery", "valueWithTimeout:", "fadeOut:"],
+source: "renderStart\x0a\x09'#helper' asJQuery remove.\x0a\x0a\x09[ :html |\x0a\x09\x09html div \x0a\x09\x09\x09id: 'helper';\x0a\x09\x09\x09with: 'Press ', self keyBinder activationKeyLabel, ' to start' ] appendToJQuery: 'body' asJQuery.\x0a\x09\x0a\x09[ '#helper' asJQuery fadeOut: 1000 ] \x0a\x09\x09valueWithTimeout: 2000",
+messageSends: ["remove", "asJQuery", "appendToJQuery:", "id:", "div", "with:", ",", "activationKeyLabel", "keyBinder", "valueWithTimeout:", "fadeOut:"],
 referencedClasses: []
 }),
 smalltalk.HLKeyBinderHelper);
@@ -2031,7 +2032,7 @@ self._handleKeyUp();
 };
 return self}, function($ctx1) {$ctx1.fill(self,"handleKeyUp:",{e:e},smalltalk.HLRepeatingKeyBindingHandler)})},
 args: ["e"],
-source: "handleKeyUp: e\x0a\x09isKeyCurrentlyPressed\x0a\x09\x09ifTrue: [ self handleKeyUp ] ",
+source: "handleKeyUp: e\x0a\x09isKeyCurrentlyPressed\x0a\x09\x09ifTrue: [ self handleKeyUp ]",
 messageSends: ["ifTrue:", "handleKeyUp"],
 referencedClasses: []
 }),
@@ -2229,5 +2230,4 @@ referencedClasses: []
 }),
 smalltalk.HLRepeatingKeyBindingHandler.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Helios-Layout.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Layout');
+
 smalltalk.addClass('HLContainer', smalltalk.HLWidget, ['splitter'], 'Helios-Layout');
 smalltalk.addMethod(
 smalltalk.method({
@@ -380,7 +381,6 @@ messageSends: ["height:", "height", "asJQuery"]}),
 smalltalk.HLVerticalSplitter);
 
 
-
 smalltalk.addMethod(
 smalltalk.method({
 selector: "isHeliosSplitter",

+ 1 - 1
js/Helios-Layout.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Layout');
+
 smalltalk.addClass('HLContainer', smalltalk.HLWidget, ['splitter'], 'Helios-Layout');
 smalltalk.addMethod(
 smalltalk.method({
@@ -515,7 +516,6 @@ referencedClasses: []
 smalltalk.HLVerticalSplitter);
 
 
-
 smalltalk.addMethod(
 smalltalk.method({
 selector: "isHeliosSplitter",

+ 1 - 1
js/Helios-References.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-References');
+
 smalltalk.addClass('HLMethodReference', smalltalk.Object, ['selector', 'methodClass'], 'Helios-References');
 smalltalk.addMethod(
 smalltalk.method({
@@ -840,5 +841,4 @@ messageSends: ["inject:into:", "classesAndMetaclasses", "new", ",", "methods"]})
 smalltalk.HLReferencesModel);
 
 
-
 })(global_smalltalk,global_nil,global__st);

+ 2 - 2
js/Helios-References.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-References');
+
 smalltalk.addClass('HLMethodReference', smalltalk.Object, ['selector', 'methodClass'], 'Helios-References');
 smalltalk.addMethod(
 smalltalk.method({
@@ -554,7 +555,7 @@ return self}
 catch(e) {if(e===$early)return e[0]; throw e}
 }, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aMethod:aMethod},smalltalk.HLReferencesListWidget)})},
 args: ["aMethod"],
-source: "onMethodSelected: aMethod\x0a\x09aMethod ifNil: [ ^ self ].\x0a\x09self items detect: [ :each | each = aMethod selector ] ifNone: [ ^ self ].\x0a\x09\x0a\x09self \x0a\x09\x09selectedItem: aMethod selector;\x0a\x09\x09activateItem: aMethod selector\x09",
+source: "onMethodSelected: aMethod\x0a\x09aMethod ifNil: [ ^ self ].\x0a\x09self items detect: [ :each | each = aMethod selector ] ifNone: [ ^ self ].\x0a\x09\x0a\x09self \x0a\x09\x09selectedItem: aMethod selector;\x0a\x09\x09activateItem: aMethod selector",
 messageSends: ["ifNil:", "detect:ifNone:", "items", "=", "selector", "selectedItem:", "activateItem:"],
 referencedClasses: []
 }),
@@ -1110,5 +1111,4 @@ referencedClasses: ["OrderedCollection"]
 smalltalk.HLReferencesModel);
 
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Helios-Transcript.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Transcript');
+
 smalltalk.addClass('HLTranscript', smalltalk.HLWidget, ['textarea'], 'Helios-Transcript');
 smalltalk.addMethod(
 smalltalk.method({
@@ -171,5 +172,4 @@ return self}, function($ctx1) {$ctx1.fill(self,"unregister:",{aTranscript:aTrans
 messageSends: ["remove:", "transcripts"]}),
 smalltalk.HLTranscriptHandler.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Helios-Transcript.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Transcript');
+
 smalltalk.addClass('HLTranscript', smalltalk.HLWidget, ['textarea'], 'Helios-Transcript');
 smalltalk.HLTranscript.comment="I am a widget responsible for displaying transcript contents.\x0a\x0a## Transcript API\x0a\x0a    Transcript \x0a        show: 'hello world';\x0a        cr;\x0a        show: anObject.\x0a\x0a    Transcript clear.\x0a\x0aSee the `Transcript` class.";
 smalltalk.addMethod(
@@ -233,5 +234,4 @@ referencedClasses: []
 }),
 smalltalk.HLTranscriptHandler.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Helios-Workspace-Tests.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Workspace-Tests');
+
 smalltalk.addClass('HLCodeWidgetTest', smalltalk.TestCase, [], 'Helios-Workspace-Tests');
 smalltalk.addMethod(
 smalltalk.method({
@@ -16,5 +17,4 @@ messageSends: ["assert:", "isKindOf:", "pcKeyMap", "macKeyMap"]}),
 smalltalk.HLCodeWidgetTest);
 
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Helios-Workspace-Tests.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Workspace-Tests');
+
 smalltalk.addClass('HLCodeWidgetTest', smalltalk.TestCase, [], 'Helios-Workspace-Tests');
 smalltalk.addMethod(
 smalltalk.method({
@@ -21,5 +22,4 @@ referencedClasses: ["HLCodeWidget", "HashedCollection"]
 smalltalk.HLCodeWidgetTest);
 
 
-
 })(global_smalltalk,global_nil,global__st);

+ 4 - 4
js/Helios-Workspace.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Workspace');
+
 smalltalk.addClass('HLCodeModel', smalltalk.Object, ['announcer', 'environment', 'receiver'], 'Helios-Workspace');
 smalltalk.addMethod(
 smalltalk.method({
@@ -685,9 +686,9 @@ var variables,classNames,pseudoVariables;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-variables=_st(_st(_st(_st(window)._jQuery_(_st(_st(anEditor)._display())._wrapper()))._find_("span.cm-variable"))._get())._collect_((function(each){
+variables=_st(_st(_st(_st(_st(_st(anEditor)._display())._wrapper())._asJQuery())._find_("span.cm-variable"))._get())._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(window)._jQuery_(each))._html();
+return _st(_st(each)._asJQuery())._html();
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
 classNames=_st(_st(_st($Smalltalk())._current())._classes())._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
@@ -703,7 +704,7 @@ return _st(each).__eq(_st(aToken)._string());
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"variableHintFor:token:",{anEditor:anEditor,aToken:aToken,variables:variables,classNames:classNames,pseudoVariables:pseudoVariables},smalltalk.HLCodeWidget)})},
-messageSends: ["collect:", "get", "find:", "jQuery:", "wrapper", "display", "html", "classes", "current", "name", "pseudoVariableNames", "reject:", "select:", "asArray", "asSet", ",", "includesSubString:", "string", "="]}),
+messageSends: ["collect:", "get", "find:", "asJQuery", "wrapper", "display", "html", "classes", "current", "name", "pseudoVariableNames", "reject:", "select:", "asArray", "asSet", ",", "includesSubString:", "string", "="]}),
 smalltalk.HLCodeWidget);
 
 
@@ -1575,5 +1576,4 @@ return (10);
 messageSends: []}),
 smalltalk.HLWorkspace.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 6 - 6
js/Helios-Workspace.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Workspace');
+
 smalltalk.addClass('HLCodeModel', smalltalk.Object, ['announcer', 'environment', 'receiver'], 'Helios-Workspace');
 smalltalk.addMethod(
 smalltalk.method({
@@ -353,7 +354,7 @@ $1=result;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"doIt",{result:result},smalltalk.HLCodeWidget)})},
 args: [],
-source: "doIt\x0a\x09| result |\x0a\x0a\x09self model announcer announce: (HLDoItRequested on: model).\x0a\x09result := model doIt: self currentLineOrSelection.\x0a\x09self model announcer announce: (HLDoItExecuted on: model).\x0a\x0a\x09^ result        ",
+source: "doIt\x0a\x09| result |\x0a\x0a\x09self model announcer announce: (HLDoItRequested on: model).\x0a\x09result := model doIt: self currentLineOrSelection.\x0a\x09self model announcer announce: (HLDoItExecuted on: model).\x0a\x0a\x09^ result",
 messageSends: ["announce:", "announcer", "model", "on:", "doIt:", "currentLineOrSelection"],
 referencedClasses: ["HLDoItRequested", "HLDoItExecuted"]
 }),
@@ -916,9 +917,9 @@ var variables,classNames,pseudoVariables;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-variables=_st(_st(_st(_st(window)._jQuery_(_st(_st(anEditor)._display())._wrapper()))._find_("span.cm-variable"))._get())._collect_((function(each){
+variables=_st(_st(_st(_st(_st(_st(anEditor)._display())._wrapper())._asJQuery())._find_("span.cm-variable"))._get())._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(window)._jQuery_(each))._html();
+return _st(_st(each)._asJQuery())._html();
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
 classNames=_st(_st(_st($Smalltalk())._current())._classes())._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
@@ -935,8 +936,8 @@ return _st(each).__eq(_st(aToken)._string());
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"variableHintFor:token:",{anEditor:anEditor,aToken:aToken,variables:variables,classNames:classNames,pseudoVariables:pseudoVariables},smalltalk.HLCodeWidget)})},
 args: ["anEditor", "aToken"],
-source: "variableHintFor: anEditor token: aToken\x0a\x09| variables classNames pseudoVariables |\x0a\x09\x0a\x09variables := ((window jQuery: anEditor display wrapper) find: 'span.cm-variable') get\x0a\x09\x09collect: [ :each | (window jQuery: each) html ].\x0a\x09\x0a\x09classNames := Smalltalk current classes collect: [ :each | each name ].\x0a\x09pseudoVariables := Smalltalk current pseudoVariableNames.\x0a\x09\x0a\x09^ ((variables, classNames, pseudoVariables) asSet asArray \x0a\x09\x09select: [ :each | each includesSubString: aToken string ])\x0a\x09\x09reject: [ :each | each = aToken string ]",
-messageSends: ["collect:", "get", "find:", "jQuery:", "wrapper", "display", "html", "classes", "current", "name", "pseudoVariableNames", "reject:", "select:", "asArray", "asSet", ",", "includesSubString:", "string", "="],
+source: "variableHintFor: anEditor token: aToken\x0a\x09| variables classNames pseudoVariables |\x0a\x09\x0a\x09variables := (anEditor display wrapper asJQuery find: 'span.cm-variable') get\x0a\x09\x09collect: [ :each | each asJQuery html ].\x0a\x09\x0a\x09classNames := Smalltalk current classes collect: [ :each | each name ].\x0a\x09pseudoVariables := Smalltalk current pseudoVariableNames.\x0a\x09\x0a\x09^ ((variables, classNames, pseudoVariables) asSet asArray \x0a\x09\x09select: [ :each | each includesSubString: aToken string ])\x0a\x09\x09reject: [ :each | each = aToken string ]",
+messageSends: ["collect:", "get", "find:", "asJQuery", "wrapper", "display", "html", "classes", "current", "name", "pseudoVariableNames", "reject:", "select:", "asArray", "asSet", ",", "includesSubString:", "string", "="],
 referencedClasses: ["Smalltalk"]
 }),
 smalltalk.HLCodeWidget);
@@ -2075,5 +2076,4 @@ referencedClasses: []
 }),
 smalltalk.HLWorkspace.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 29 - 31
js/IDE.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('IDE');
+
 smalltalk.addClass('ClassesList', smalltalk.Widget, ['browser', 'ul', 'nodes'], 'IDE');
 smalltalk.addMethod(
 smalltalk.method({
@@ -472,7 +473,7 @@ return smalltalk.withContext(function($ctx2) {
 return _st(compiler)._parseExpression_(aString);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._on_do_($Error(),(function(ex){
 return smalltalk.withContext(function($ctx2) {
-$1=_st(window)._alert_(_st(ex)._messageText());
+$1=self._alert_(_st(ex)._messageText());
 throw $early=[$1];
 }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1,2)})}));
 $2=_st(compiler)._evaluateExpression_on_(aString,self._receiver());
@@ -889,13 +890,9 @@ selector: "onResize:",
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-jQuery('#amber').resizable({
-	handles: 'n',
-	resize: aBlock,
-	minHeight: 230
-});
+_st("#amber"._asJQuery())._resizable_(smalltalk.HashedCollection._from_(["handles".__minus_gt("n"),"resize".__minus_gt(aBlock),"minHeight".__minus_gt((230))]));
 return self}, function($ctx1) {$ctx1.fill(self,"onResize:",{aBlock:aBlock},smalltalk.TabManager)})},
-messageSends: []}),
+messageSends: ["resizable:", "asJQuery", "->"]}),
 smalltalk.TabManager);
 
 smalltalk.addMethod(
@@ -904,9 +901,9 @@ selector: "onWindowResize:",
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-jQuery(window).resize(aBlock);
+_st(_st(window)._asJQuery())._resize_(aBlock);
 return self}, function($ctx1) {$ctx1.fill(self,"onWindowResize:",{aBlock:aBlock},smalltalk.TabManager)})},
-messageSends: []}),
+messageSends: ["resize:", "asJQuery"]}),
 smalltalk.TabManager);
 
 smalltalk.addMethod(
@@ -1184,9 +1181,12 @@ selector: "updatePosition",
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-jQuery('#amber').css('top', '').css('bottom', '0px');
+var $1,$2;
+$1="#amber"._asJQuery();
+_st($1)._css_put_("top","");
+$2=_st($1)._css_put_("bottom","0px");
 return self}, function($ctx1) {$ctx1.fill(self,"updatePosition",{},smalltalk.TabManager)})},
-messageSends: []}),
+messageSends: ["css:put:", "asJQuery"]}),
 smalltalk.TabManager);
 
 
@@ -1230,11 +1230,11 @@ function $Browser(){return smalltalk.Browser||(typeof Browser=="undefined"?nil:B
 function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2;
-$1=_st(_st(_st(window)._jQuery_("#amber"))._length()).__eq((0));
+$1=_st(_st("#amber"._asJQuery())._length()).__eq((0));
 if(smalltalk.assert($1)){
 _st($Browser())._open();
 } else {
-$2=_st(_st(window)._jQuery_("#amber"))._is_(":visible");
+$2=_st("#amber"._asJQuery())._is_(":visible");
 if(smalltalk.assert($2)){
 _st(_st($TabManager())._current())._close();
 } else {
@@ -1242,7 +1242,7 @@ _st(_st($TabManager())._current())._open();
 };
 };
 return self}, function($ctx1) {$ctx1.fill(self,"toggleAmberIDE",{},smalltalk.TabManager.klass)})},
-messageSends: ["ifTrue:ifFalse:", "=", "length", "jQuery:", "open", "is:", "close", "current"]}),
+messageSends: ["ifTrue:ifFalse:", "=", "length", "asJQuery", "open", "is:", "close", "current"]}),
 smalltalk.TabManager.klass);
 
 
@@ -1444,7 +1444,7 @@ function $Object(){return smalltalk.Object||(typeof Object=="undefined"?nil:Obje
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2,$3;
-className=_st(window)._prompt_("New class");
+className=self._prompt_("New class");
 $1=_st(_st(className)._notNil())._and_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(className)._notEmpty();
@@ -1469,7 +1469,7 @@ var self=this;
 var newProtocol;
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-newProtocol=_st(window)._prompt_("New method protocol");
+newProtocol=self._prompt_("New method protocol");
 $1=_st(_st(newProtocol)._notNil())._and_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(newProtocol)._notEmpty();
@@ -1502,7 +1502,7 @@ return smalltalk.withContext(function($ctx1) {
 var $2,$1;
 $2=self["@unsavedChanges"];
 if(smalltalk.assert($2)){
-$1=_st(window)._confirm_("Cancel changes?");
+$1=self._confirm_("Cancel changes?");
 } else {
 $1=true;
 };
@@ -1704,6 +1704,7 @@ fn: function (aClass){
 var self=this;
 var compiler,method,source,node;
 function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
+function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
 function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2,$3,$4,$5,$6;
@@ -1722,23 +1723,21 @@ _st(compiler)._source_(source);
 node=_st(compiler)._parse_(source);
 $2=_st(node)._isParseFailure();
 if(smalltalk.assert($2)){
-$3=_st(window)._alert_(_st(_st("PARSE ERROR: ".__comma(_st(node)._reason())).__comma(", position: ")).__comma(_st(_st(node)._position())._asString()));
+$3=self._alert_(_st(_st("PARSE ERROR: ".__comma(_st(node)._reason())).__comma(", position: ")).__comma(_st(_st(node)._position())._asString()));
 return $3;
 };
 _st(compiler)._currentClass_(aClass);
 method=_st(compiler)._eval_(_st(compiler)._compileNode_(node));
 _st(_st(compiler)._unknownVariables())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$4=_st(window)._at_(each);
-if(($receiver = $4) == nil || $receiver == undefined){
-$5=_st(window)._confirm_(_st("Declare '".__comma(each)).__comma("' as instance variable?"));
+$4=_st($PlatformInterface())._existsGlobal_(each);
+if(! smalltalk.assert($4)){
+$5=self._confirm_(_st("Declare '".__comma(each)).__comma("' as instance variable?"));
 if(smalltalk.assert($5)){
 self._addInstanceVariableNamed_toClass_(each,aClass);
 $6=self._compileMethodDefinitionFor_(aClass);
 throw $early=[$6];
 };
-} else {
-return $4;
 };
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})}));
 _st(_st($ClassBuilder())._new())._installMethod_forClass_category_(method,aClass,self["@selectedProtocol"]);
@@ -1747,7 +1746,7 @@ self._selectMethod_(method);
 return self}
 catch(e) {if(e===$early)return e[0]; throw e}
 }, function($ctx1) {$ctx1.fill(self,"compileMethodDefinitionFor:",{aClass:aClass,compiler:compiler,method:method,source:source,node:node},smalltalk.Browser)})},
-messageSends: ["val", "ifNil:", "category", "new", "source:", "parse:", "ifTrue:", "isParseFailure", "alert:", ",", "reason", "asString", "position", "currentClass:", "eval:", "compileNode:", "do:", "unknownVariables", "at:", "confirm:", "addInstanceVariableNamed:toClass:", "compileMethodDefinitionFor:", "installMethod:forClass:category:", "updateMethodsList", "selectMethod:"]}),
+messageSends: ["val", "ifNil:", "category", "new", "source:", "parse:", "ifTrue:", "isParseFailure", "alert:", ",", "reason", "asString", "position", "currentClass:", "eval:", "compileNode:", "do:", "unknownVariables", "ifFalse:", "existsGlobal:", "confirm:", "addInstanceVariableNamed:toClass:", "compileMethodDefinitionFor:", "installMethod:forClass:category:", "updateMethodsList", "selectMethod:"]}),
 smalltalk.Browser);
 
 smalltalk.addMethod(
@@ -1760,7 +1759,7 @@ function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="u
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2,$3;
-className=_st(window)._prompt_("Copy class");
+className=self._prompt_("Copy class");
 $1=_st(_st(className)._notNil())._and_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(className)._notEmpty();
@@ -2066,7 +2065,7 @@ var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-$1=_st(window)._confirm_(_st("Do you really want to remove ".__comma(_st(self["@selectedClass"])._name())).__comma("?"));
+$1=self._confirm_(_st("Do you really want to remove ".__comma(_st(self["@selectedClass"])._name())).__comma("?"));
 if(smalltalk.assert($1)){
 _st(_st($Smalltalk())._current())._removeClass_(self["@selectedClass"]);
 self._resetClassesList();
@@ -2085,7 +2084,7 @@ return smalltalk.withContext(function($ctx1) {
 var $1,$2,$3;
 $1=self._cancelChanges();
 if(smalltalk.assert($1)){
-$2=_st(window)._confirm_(_st("Do you really want to remove #".__comma(_st(self["@selectedMethod"])._selector())).__comma("?"));
+$2=self._confirm_(_st("Do you really want to remove #".__comma(_st(self["@selectedMethod"])._selector())).__comma("?"));
 if(smalltalk.assert($2)){
 $3=_st(self["@selectedTab"]).__eq("instance");
 if(smalltalk.assert($3)){
@@ -2108,7 +2107,7 @@ var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-$1=_st(window)._confirm_(_st("Do you really want to remove the whole package ".__comma(self["@selectedPackage"])).__comma(" with all its classes?"));
+$1=self._confirm_(_st("Do you really want to remove the whole package ".__comma(self["@selectedPackage"])).__comma(" with all its classes?"));
 if(smalltalk.assert($1)){
 _st(_st($Smalltalk())._current())._removePackage_(self["@selectedPackage"]);
 self._updateCategoriesList();
@@ -2125,7 +2124,7 @@ var self=this;
 var newName;
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2,$3;
-newName=_st(window)._prompt_("Rename class ".__comma(_st(self["@selectedClass"])._name()));
+newName=self._prompt_("Rename class ".__comma(_st(self["@selectedClass"])._name()));
 $1=_st(_st(newName)._notNil())._and_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(newName)._notEmpty();
@@ -2150,7 +2149,7 @@ var newName;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2;
-newName=_st(window)._prompt_("Rename package ".__comma(self["@selectedPackage"]));
+newName=self._prompt_("Rename package ".__comma(self["@selectedPackage"]));
 $1=newName;
 if(($receiver = $1) == nil || $receiver == undefined){
 $1;
@@ -5398,7 +5397,6 @@ messageSends: ["show", "focus"]}),
 smalltalk.Workspace);
 
 
-
 smalltalk.addMethod(
 smalltalk.method({
 selector: "inspectOn:",

+ 45 - 47
js/IDE.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('IDE');
+
 smalltalk.addClass('ClassesList', smalltalk.Widget, ['browser', 'ul', 'nodes'], 'IDE');
 smalltalk.addMethod(
 smalltalk.method({
@@ -608,7 +609,7 @@ return smalltalk.withContext(function($ctx2) {
 return _st(compiler)._parseExpression_(aString);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._on_do_($Error(),(function(ex){
 return smalltalk.withContext(function($ctx2) {
-$1=_st(window)._alert_(_st(ex)._messageText());
+$1=self._alert_(_st(ex)._messageText());
 throw $early=[$1];
 }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1,2)})}));
 $2=_st(compiler)._evaluateExpression_on_(aString,self._receiver());
@@ -617,7 +618,7 @@ return $2;
 catch(e) {if(e===$early)return e[0]; throw e}
 }, function($ctx1) {$ctx1.fill(self,"eval:",{aString:aString,compiler:compiler},smalltalk.SourceArea)})},
 args: ["aString"],
-source: "eval: aString\x0a\x09| compiler |\x0a\x09compiler := Compiler new.\x0a\x09[ compiler parseExpression: aString ] on: Error do: [:ex |\x0a\x09\x09^window alert: ex messageText].\x0a\x09^compiler evaluateExpression: aString on: self receiver",
+source: "eval: aString\x0a\x09| compiler |\x0a\x09compiler := Compiler new.\x0a\x09[ compiler parseExpression: aString ] on: Error do: [:ex |\x0a\x09\x09^self alert: ex messageText].\x0a\x09^compiler evaluateExpression: aString on: self receiver",
 messageSends: ["new", "on:do:", "parseExpression:", "alert:", "messageText", "evaluateExpression:on:", "receiver"],
 referencedClasses: ["Compiler", "Error"]
 }),
@@ -1155,15 +1156,11 @@ category: 'actions',
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-jQuery('#amber').resizable({
-	handles: 'n',
-	resize: aBlock,
-	minHeight: 230
-});
+_st("#amber"._asJQuery())._resizable_(smalltalk.HashedCollection._from_(["handles".__minus_gt("n"),"resize".__minus_gt(aBlock),"minHeight".__minus_gt((230))]));
 return self}, function($ctx1) {$ctx1.fill(self,"onResize:",{aBlock:aBlock},smalltalk.TabManager)})},
 args: ["aBlock"],
-source: "onResize: aBlock\x0a\x09<jQuery('#amber').resizable({\x0a\x09handles: 'n',\x0a\x09resize: aBlock,\x0a\x09minHeight: 230\x0a})>",
-messageSends: [],
+source: "onResize: aBlock\x0a\x09'#amber' asJQuery resizable: #{\x0a\x09\x09'handles' -> 'n'.\x0a\x09\x09'resize' -> aBlock.\x0a\x09\x09'minHeight' -> 230\x0a\x09}",
+messageSends: ["resizable:", "asJQuery", "->"],
 referencedClasses: []
 }),
 smalltalk.TabManager);
@@ -1175,11 +1172,11 @@ category: 'actions',
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-jQuery(window).resize(aBlock);
+_st(_st(window)._asJQuery())._resize_(aBlock);
 return self}, function($ctx1) {$ctx1.fill(self,"onWindowResize:",{aBlock:aBlock},smalltalk.TabManager)})},
 args: ["aBlock"],
-source: "onWindowResize: aBlock\x0a\x09<jQuery(window).resize(aBlock)>",
-messageSends: [],
+source: "onWindowResize: aBlock\x0a\x09window asJQuery resize: aBlock",
+messageSends: ["resize:", "asJQuery"],
 referencedClasses: []
 }),
 smalltalk.TabManager);
@@ -1525,11 +1522,14 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-jQuery('#amber').css('top', '').css('bottom', '0px');
+var $1,$2;
+$1="#amber"._asJQuery();
+_st($1)._css_put_("top","");
+$2=_st($1)._css_put_("bottom","0px");
 return self}, function($ctx1) {$ctx1.fill(self,"updatePosition",{},smalltalk.TabManager)})},
 args: [],
-source: "updatePosition\x0a\x09<jQuery('#amber').css('top', '').css('bottom', '0px')>",
-messageSends: [],
+source: "updatePosition\x0a\x09'#amber' asJQuery\x0a\x09\x09css: 'top' put: '';\x0a\x09\x09css: 'bottom' put: '0px'",
+messageSends: ["css:put:", "asJQuery"],
 referencedClasses: []
 }),
 smalltalk.TabManager);
@@ -1586,11 +1586,11 @@ function $Browser(){return smalltalk.Browser||(typeof Browser=="undefined"?nil:B
 function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2;
-$1=_st(_st(_st(window)._jQuery_("#amber"))._length()).__eq((0));
+$1=_st(_st("#amber"._asJQuery())._length()).__eq((0));
 if(smalltalk.assert($1)){
 _st($Browser())._open();
 } else {
-$2=_st(_st(window)._jQuery_("#amber"))._is_(":visible");
+$2=_st("#amber"._asJQuery())._is_(":visible");
 if(smalltalk.assert($2)){
 _st(_st($TabManager())._current())._close();
 } else {
@@ -1599,8 +1599,8 @@ _st(_st($TabManager())._current())._open();
 };
 return self}, function($ctx1) {$ctx1.fill(self,"toggleAmberIDE",{},smalltalk.TabManager.klass)})},
 args: [],
-source: "toggleAmberIDE\x0a\x09(window jQuery: '#amber') length = 0\x0a\x09\x09ifTrue: [ Browser open ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09((window jQuery: '#amber') is: ':visible')\x0a\x09\x09\x09\x09ifTrue: [ TabManager current close ]\x0a\x09\x09\x09\x09ifFalse: [ TabManager current open ] ]",
-messageSends: ["ifTrue:ifFalse:", "=", "length", "jQuery:", "open", "is:", "close", "current"],
+source: "toggleAmberIDE\x0a\x09'#amber' asJQuery length = 0\x0a\x09\x09ifTrue: [ Browser open ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09('#amber' asJQuery is: ':visible')\x0a\x09\x09\x09\x09ifTrue: [ TabManager current close ]\x0a\x09\x09\x09\x09ifFalse: [ TabManager current open ] ]",
+messageSends: ["ifTrue:ifFalse:", "=", "length", "asJQuery", "open", "is:", "close", "current"],
 referencedClasses: ["Browser", "TabManager"]
 }),
 smalltalk.TabManager.klass);
@@ -1875,7 +1875,7 @@ function $Object(){return smalltalk.Object||(typeof Object=="undefined"?nil:Obje
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2,$3;
-className=_st(window)._prompt_("New class");
+className=self._prompt_("New class");
 $1=_st(_st(className)._notNil())._and_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(className)._notEmpty();
@@ -1890,7 +1890,7 @@ self._selectClass_(_st(_st($Smalltalk())._current())._at_(className));
 };
 return self}, function($ctx1) {$ctx1.fill(self,"addNewClass",{className:className},smalltalk.Browser)})},
 args: [],
-source: "addNewClass\x0a\x09| className |\x0a\x09className := window prompt: 'New class'.\x0a\x09(className notNil and: [className notEmpty]) ifTrue: [\x0a\x09\x09Object subclass: className instanceVariableNames: '' package: self selectedPackage.\x0a\x09\x09\x09self\x0a\x09\x09\x09resetClassesList;\x0a\x09\x09\x09updateClassesList.\x0a\x09\x09self selectClass: (Smalltalk current at: className)]",
+source: "addNewClass\x0a\x09| className |\x0a\x09className := self prompt: 'New class'.\x0a\x09(className notNil and: [className notEmpty]) ifTrue: [\x0a\x09\x09Object subclass: className instanceVariableNames: '' package: self selectedPackage.\x0a\x09\x09\x09self\x0a\x09\x09\x09resetClassesList;\x0a\x09\x09\x09updateClassesList.\x0a\x09\x09self selectClass: (Smalltalk current at: className)]",
 messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "subclass:instanceVariableNames:package:", "selectedPackage", "resetClassesList", "updateClassesList", "selectClass:", "at:", "current"],
 referencedClasses: ["Object", "Smalltalk"]
 }),
@@ -1905,7 +1905,7 @@ var self=this;
 var newProtocol;
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-newProtocol=_st(window)._prompt_("New method protocol");
+newProtocol=self._prompt_("New method protocol");
 $1=_st(_st(newProtocol)._notNil())._and_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(newProtocol)._notEmpty();
@@ -1916,7 +1916,7 @@ self._setMethodProtocol_(newProtocol);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"addNewProtocol",{newProtocol:newProtocol},smalltalk.Browser)})},
 args: [],
-source: "addNewProtocol\x0a\x09| newProtocol |\x0a\x09newProtocol := window prompt: 'New method protocol'.\x0a\x09(newProtocol notNil and: [newProtocol notEmpty]) ifTrue: [\x0a\x09selectedMethod category: newProtocol.\x0a\x09self setMethodProtocol: newProtocol]",
+source: "addNewProtocol\x0a\x09| newProtocol |\x0a\x09newProtocol := self prompt: 'New method protocol'.\x0a\x09(newProtocol notNil and: [newProtocol notEmpty]) ifTrue: [\x0a\x09selectedMethod category: newProtocol.\x0a\x09self setMethodProtocol: newProtocol]",
 messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "category:", "setMethodProtocol:"],
 referencedClasses: []
 }),
@@ -1948,14 +1948,14 @@ return smalltalk.withContext(function($ctx1) {
 var $2,$1;
 $2=self["@unsavedChanges"];
 if(smalltalk.assert($2)){
-$1=_st(window)._confirm_("Cancel changes?");
+$1=self._confirm_("Cancel changes?");
 } else {
 $1=true;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"cancelChanges",{},smalltalk.Browser)})},
 args: [],
-source: "cancelChanges\x0a\x09^unsavedChanges\x0a\x09ifTrue: [window confirm: 'Cancel changes?']\x0a\x09ifFalse: [true]",
+source: "cancelChanges\x0a\x09^unsavedChanges\x0a\x09ifTrue: [self confirm: 'Cancel changes?']\x0a\x09ifFalse: [true]",
 messageSends: ["ifTrue:ifFalse:", "confirm:"],
 referencedClasses: []
 }),
@@ -2200,6 +2200,7 @@ fn: function (aClass){
 var self=this;
 var compiler,method,source,node;
 function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
+function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
 function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2,$3,$4,$5,$6;
@@ -2218,23 +2219,21 @@ _st(compiler)._source_(source);
 node=_st(compiler)._parse_(source);
 $2=_st(node)._isParseFailure();
 if(smalltalk.assert($2)){
-$3=_st(window)._alert_(_st(_st("PARSE ERROR: ".__comma(_st(node)._reason())).__comma(", position: ")).__comma(_st(_st(node)._position())._asString()));
+$3=self._alert_(_st(_st("PARSE ERROR: ".__comma(_st(node)._reason())).__comma(", position: ")).__comma(_st(_st(node)._position())._asString()));
 return $3;
 };
 _st(compiler)._currentClass_(aClass);
 method=_st(compiler)._eval_(_st(compiler)._compileNode_(node));
 _st(_st(compiler)._unknownVariables())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$4=_st(window)._at_(each);
-if(($receiver = $4) == nil || $receiver == undefined){
-$5=_st(window)._confirm_(_st("Declare '".__comma(each)).__comma("' as instance variable?"));
+$4=_st($PlatformInterface())._existsGlobal_(each);
+if(! smalltalk.assert($4)){
+$5=self._confirm_(_st("Declare '".__comma(each)).__comma("' as instance variable?"));
 if(smalltalk.assert($5)){
 self._addInstanceVariableNamed_toClass_(each,aClass);
 $6=self._compileMethodDefinitionFor_(aClass);
 throw $early=[$6];
 };
-} else {
-return $4;
 };
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})}));
 _st(_st($ClassBuilder())._new())._installMethod_forClass_category_(method,aClass,self["@selectedProtocol"]);
@@ -2244,9 +2243,9 @@ return self}
 catch(e) {if(e===$early)return e[0]; throw e}
 }, function($ctx1) {$ctx1.fill(self,"compileMethodDefinitionFor:",{aClass:aClass,compiler:compiler,method:method,source:source,node:node},smalltalk.Browser)})},
 args: ["aClass"],
-source: "compileMethodDefinitionFor: aClass\x0a\x09| compiler method source node |\x0a\x09source := sourceArea val.\x0a\x09selectedProtocol ifNil: [ selectedProtocol := selectedMethod category ].\x0a\x09compiler := Compiler new.\x0a\x09compiler source: source.\x0a\x09node := compiler parse: source.\x0a\x09node isParseFailure ifTrue: [\x0a\x09^window alert: 'PARSE ERROR: ', node reason, ', position: ', node position asString].\x0a\x09compiler currentClass: aClass.\x0a\x09method := compiler eval: (compiler compileNode: node).\x0a\x09compiler unknownVariables do: [:each |\x0a\x09\x09\x22Do not try to redeclare javascript's objects\x22\x0a\x09\x09(window at: each) ifNil: [\x0a\x09\x09(window confirm: 'Declare ''', each, ''' as instance variable?') ifTrue: [\x0a\x09\x09\x09self addInstanceVariableNamed: each toClass: aClass.\x0a\x09\x09\x09^self compileMethodDefinitionFor: aClass]]].\x0a\x09ClassBuilder new installMethod: method forClass: aClass category: selectedProtocol.\x0a\x09self updateMethodsList.\x0a\x09self selectMethod: method",
-messageSends: ["val", "ifNil:", "category", "new", "source:", "parse:", "ifTrue:", "isParseFailure", "alert:", ",", "reason", "asString", "position", "currentClass:", "eval:", "compileNode:", "do:", "unknownVariables", "at:", "confirm:", "addInstanceVariableNamed:toClass:", "compileMethodDefinitionFor:", "installMethod:forClass:category:", "updateMethodsList", "selectMethod:"],
-referencedClasses: ["Compiler", "ClassBuilder"]
+source: "compileMethodDefinitionFor: aClass\x0a\x09| compiler method source node |\x0a\x09source := sourceArea val.\x0a\x09selectedProtocol ifNil: [ selectedProtocol := selectedMethod category ].\x0a\x09compiler := Compiler new.\x0a\x09compiler source: source.\x0a\x09node := compiler parse: source.\x0a\x09node isParseFailure ifTrue: [\x0a\x09^self alert: 'PARSE ERROR: ', node reason, ', position: ', node position asString].\x0a\x09compiler currentClass: aClass.\x0a\x09method := compiler eval: (compiler compileNode: node).\x0a\x09compiler unknownVariables do: [:each |\x0a\x09\x09\x22Do not try to redeclare javascript's objects\x22\x0a\x09\x09(PlatformInterface existsGlobal: each) ifFalse: [\x0a\x09\x09(self confirm: 'Declare ''', each, ''' as instance variable?') ifTrue: [\x0a\x09\x09\x09self addInstanceVariableNamed: each toClass: aClass.\x0a\x09\x09\x09^self compileMethodDefinitionFor: aClass]]].\x0a\x09ClassBuilder new installMethod: method forClass: aClass category: selectedProtocol.\x0a\x09self updateMethodsList.\x0a\x09self selectMethod: method",
+messageSends: ["val", "ifNil:", "category", "new", "source:", "parse:", "ifTrue:", "isParseFailure", "alert:", ",", "reason", "asString", "position", "currentClass:", "eval:", "compileNode:", "do:", "unknownVariables", "ifFalse:", "existsGlobal:", "confirm:", "addInstanceVariableNamed:toClass:", "compileMethodDefinitionFor:", "installMethod:forClass:category:", "updateMethodsList", "selectMethod:"],
+referencedClasses: ["Compiler", "PlatformInterface", "ClassBuilder"]
 }),
 smalltalk.Browser);
 
@@ -2261,7 +2260,7 @@ function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="u
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2,$3;
-className=_st(window)._prompt_("Copy class");
+className=self._prompt_("Copy class");
 $1=_st(_st(className)._notNil())._and_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(className)._notEmpty();
@@ -2276,7 +2275,7 @@ self._selectClass_(_st(_st($Smalltalk())._current())._at_(className));
 };
 return self}, function($ctx1) {$ctx1.fill(self,"copyClass",{className:className},smalltalk.Browser)})},
 args: [],
-source: "copyClass\x0a\x09| className |\x0a\x09className := window prompt: 'Copy class'.\x0a\x09(className notNil and: [className notEmpty]) ifTrue: [\x0a\x09\x09ClassBuilder new copyClass: self selectedClass named: className.\x0a\x09\x09\x09self\x0a\x09\x09\x09resetClassesList;\x0a\x09\x09\x09updateClassesList.\x0a\x09\x09self selectClass: (Smalltalk current at: className)]",
+source: "copyClass\x0a\x09| className |\x0a\x09className := self prompt: 'Copy class'.\x0a\x09(className notNil and: [className notEmpty]) ifTrue: [\x0a\x09\x09ClassBuilder new copyClass: self selectedClass named: className.\x0a\x09\x09\x09self\x0a\x09\x09\x09resetClassesList;\x0a\x09\x09\x09updateClassesList.\x0a\x09\x09self selectClass: (Smalltalk current at: className)]",
 messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "copyClass:named:", "new", "selectedClass", "resetClassesList", "updateClassesList", "selectClass:", "at:", "current"],
 referencedClasses: ["ClassBuilder", "Smalltalk"]
 }),
@@ -2637,7 +2636,7 @@ var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-$1=_st(window)._confirm_(_st("Do you really want to remove ".__comma(_st(self["@selectedClass"])._name())).__comma("?"));
+$1=self._confirm_(_st("Do you really want to remove ".__comma(_st(self["@selectedClass"])._name())).__comma("?"));
 if(smalltalk.assert($1)){
 _st(_st($Smalltalk())._current())._removeClass_(self["@selectedClass"]);
 self._resetClassesList();
@@ -2645,7 +2644,7 @@ self._selectClass_(nil);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"removeClass",{},smalltalk.Browser)})},
 args: [],
-source: "removeClass\x0a\x09(window confirm: 'Do you really want to remove ', selectedClass name, '?')\x0a\x09ifTrue: [\x0a\x09\x09Smalltalk current removeClass: selectedClass.\x0a\x09\x09self resetClassesList.\x0a\x09\x09self selectClass: nil]",
+source: "removeClass\x0a\x09(self confirm: 'Do you really want to remove ', selectedClass name, '?')\x0a\x09ifTrue: [\x0a\x09\x09Smalltalk current removeClass: selectedClass.\x0a\x09\x09self resetClassesList.\x0a\x09\x09self selectClass: nil]",
 messageSends: ["ifTrue:", "confirm:", ",", "name", "removeClass:", "current", "resetClassesList", "selectClass:"],
 referencedClasses: ["Smalltalk"]
 }),
@@ -2661,7 +2660,7 @@ return smalltalk.withContext(function($ctx1) {
 var $1,$2,$3;
 $1=self._cancelChanges();
 if(smalltalk.assert($1)){
-$2=_st(window)._confirm_(_st("Do you really want to remove #".__comma(_st(self["@selectedMethod"])._selector())).__comma("?"));
+$2=self._confirm_(_st("Do you really want to remove #".__comma(_st(self["@selectedMethod"])._selector())).__comma("?"));
 if(smalltalk.assert($2)){
 $3=_st(self["@selectedTab"]).__eq("instance");
 if(smalltalk.assert($3)){
@@ -2674,7 +2673,7 @@ self._selectMethod_(nil);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"removeMethod",{},smalltalk.Browser)})},
 args: [],
-source: "removeMethod\x0a\x09self cancelChanges ifTrue: [\x0a\x09(window confirm: 'Do you really want to remove #', selectedMethod selector, '?')\x0a\x09\x09ifTrue: [\x0a\x09\x09selectedTab = #instance\x0a\x09\x09\x09ifTrue: [selectedClass removeCompiledMethod: selectedMethod]\x0a\x09\x09\x09ifFalse: [selectedClass class removeCompiledMethod: selectedMethod].\x0a\x09\x09self selectMethod: nil]]",
+source: "removeMethod\x0a\x09self cancelChanges ifTrue: [\x0a\x09(self confirm: 'Do you really want to remove #', selectedMethod selector, '?')\x0a\x09\x09ifTrue: [\x0a\x09\x09selectedTab = #instance\x0a\x09\x09\x09ifTrue: [selectedClass removeCompiledMethod: selectedMethod]\x0a\x09\x09\x09ifFalse: [selectedClass class removeCompiledMethod: selectedMethod].\x0a\x09\x09self selectMethod: nil]]",
 messageSends: ["ifTrue:", "cancelChanges", "confirm:", ",", "selector", "ifTrue:ifFalse:", "=", "removeCompiledMethod:", "class", "selectMethod:"],
 referencedClasses: []
 }),
@@ -2689,14 +2688,14 @@ var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-$1=_st(window)._confirm_(_st("Do you really want to remove the whole package ".__comma(self["@selectedPackage"])).__comma(" with all its classes?"));
+$1=self._confirm_(_st("Do you really want to remove the whole package ".__comma(self["@selectedPackage"])).__comma(" with all its classes?"));
 if(smalltalk.assert($1)){
 _st(_st($Smalltalk())._current())._removePackage_(self["@selectedPackage"]);
 self._updateCategoriesList();
 };
 return self}, function($ctx1) {$ctx1.fill(self,"removePackage",{},smalltalk.Browser)})},
 args: [],
-source: "removePackage\x0a\x0a\x09(window confirm: 'Do you really want to remove the whole package ', selectedPackage, ' with all its classes?')\x0a\x09ifTrue: [\x0a\x09\x09Smalltalk current removePackage: selectedPackage.\x0a\x09\x09self updateCategoriesList]",
+source: "removePackage\x0a\x0a\x09(self confirm: 'Do you really want to remove the whole package ', selectedPackage, ' with all its classes?')\x0a\x09ifTrue: [\x0a\x09\x09Smalltalk current removePackage: selectedPackage.\x0a\x09\x09self updateCategoriesList]",
 messageSends: ["ifTrue:", "confirm:", ",", "removePackage:", "current", "updateCategoriesList"],
 referencedClasses: ["Smalltalk"]
 }),
@@ -2711,7 +2710,7 @@ var self=this;
 var newName;
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2,$3;
-newName=_st(window)._prompt_("Rename class ".__comma(_st(self["@selectedClass"])._name()));
+newName=self._prompt_("Rename class ".__comma(_st(self["@selectedClass"])._name()));
 $1=_st(_st(newName)._notNil())._and_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(newName)._notEmpty();
@@ -2725,7 +2724,7 @@ $3;
 };
 return self}, function($ctx1) {$ctx1.fill(self,"renameClass",{newName:newName},smalltalk.Browser)})},
 args: [],
-source: "renameClass\x0a\x09| newName |\x0a\x09newName := window prompt: 'Rename class ', selectedClass name.\x0a\x09(newName notNil and: [newName notEmpty]) ifTrue: [\x0a\x09selectedClass rename: newName.\x0a\x09self\x0a\x09\x09updateClassesList;\x0a\x09\x09updateSourceAndButtons]",
+source: "renameClass\x0a\x09| newName |\x0a\x09newName := self prompt: 'Rename class ', selectedClass name.\x0a\x09(newName notNil and: [newName notEmpty]) ifTrue: [\x0a\x09selectedClass rename: newName.\x0a\x09self\x0a\x09\x09updateClassesList;\x0a\x09\x09updateSourceAndButtons]",
 messageSends: ["prompt:", ",", "name", "ifTrue:", "and:", "notNil", "notEmpty", "rename:", "updateClassesList", "updateSourceAndButtons"],
 referencedClasses: []
 }),
@@ -2741,7 +2740,7 @@ var newName;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2;
-newName=_st(window)._prompt_("Rename package ".__comma(self["@selectedPackage"]));
+newName=self._prompt_("Rename package ".__comma(self["@selectedPackage"]));
 $1=newName;
 if(($receiver = $1) == nil || $receiver == undefined){
 $1;
@@ -2754,7 +2753,7 @@ self._updateCategoriesList();
 };
 return self}, function($ctx1) {$ctx1.fill(self,"renamePackage",{newName:newName},smalltalk.Browser)})},
 args: [],
-source: "renamePackage\x0a\x0a\x09| newName |\x0a\x09newName := window prompt: 'Rename package ', selectedPackage.\x0a\x09newName ifNotNil: [\x0a\x09newName notEmpty ifTrue: [\x0a\x09Smalltalk current renamePackage: selectedPackage to: newName.\x0a\x09self updateCategoriesList]]",
+source: "renamePackage\x0a\x0a\x09| newName |\x0a\x09newName := self prompt: 'Rename package ', selectedPackage.\x0a\x09newName ifNotNil: [\x0a\x09newName notEmpty ifTrue: [\x0a\x09Smalltalk current renamePackage: selectedPackage to: newName.\x0a\x09self updateCategoriesList]]",
 messageSends: ["prompt:", ",", "ifNotNil:", "ifTrue:", "notEmpty", "renamePackage:to:", "current", "updateCategoriesList"],
 referencedClasses: ["Smalltalk"]
 }),
@@ -6793,7 +6792,6 @@ referencedClasses: []
 smalltalk.Workspace);
 
 
-
 smalltalk.addMethod(
 smalltalk.method({
 selector: "inspectOn:",

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 419 - 400
js/Importer-Exporter.deploy.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 425 - 471
js/Importer-Exporter.js


+ 1 - 1
js/Kernel-Announcements.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Kernel-Announcements');
+
 smalltalk.addClass('AnnouncementSubscription', smalltalk.Object, ['valuable', 'announcementClass'], 'Kernel-Announcements');
 smalltalk.addMethod(
 smalltalk.method({
@@ -553,5 +554,4 @@ smalltalk.addClass('ProtocolAdded', smalltalk.ProtocolAnnouncement, [], 'Kernel-
 
 smalltalk.addClass('ProtocolRemoved', smalltalk.ProtocolAnnouncement, [], 'Kernel-Announcements');
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Kernel-Announcements.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Kernel-Announcements');
+
 smalltalk.addClass('AnnouncementSubscription', smalltalk.Object, ['valuable', 'announcementClass'], 'Kernel-Announcements');
 smalltalk.AnnouncementSubscription.comment="I am a single entry in a subscription registry of an `Announcer`.\x0aSeveral subscriptions by the same object is possible.";
 smalltalk.addMethod(
@@ -761,5 +762,4 @@ smalltalk.ProtocolAdded.comment="I am emitted when a protocol is added to a clas
 smalltalk.addClass('ProtocolRemoved', smalltalk.ProtocolAnnouncement, [], 'Kernel-Announcements');
 smalltalk.ProtocolRemoved.comment="I am emitted when a protocol is removed from a class.";
 
-
 })(global_smalltalk,global_nil,global__st);

+ 2 - 5
js/Kernel-Classes.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Kernel-Classes');
+
 smalltalk.addClass('Behavior', smalltalk.Object, [], 'Kernel-Classes');
 smalltalk.addMethod(
 smalltalk.method({
@@ -178,10 +179,7 @@ selector: "basicRemoveCompiledMethod:",
 fn: function (aMethod){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-
-		smalltalk.removeMethod(aMethod)
-		smalltalk.init(self);
-	;
+smalltalk.removeMethod(aMethod,self);
 return self}, function($ctx1) {$ctx1.fill(self,"basicRemoveCompiledMethod:",{aMethod:aMethod},smalltalk.Behavior)})},
 messageSends: []}),
 smalltalk.Behavior);
@@ -1637,5 +1635,4 @@ return $1;
 messageSends: ["theClass:", "new", "level:", "getNodesFrom:", "yourself"]}),
 smalltalk.ClassSorterNode.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 3 - 6
js/Kernel-Classes.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Kernel-Classes');
+
 smalltalk.addClass('Behavior', smalltalk.Object, [], 'Kernel-Classes');
 smalltalk.Behavior.comment="I am the superclass of all class objects.\x0a\x0aI define the protocol for creating instances of a class with `#basicNew` and `#new` (see `boot.js` for class constructors details).\x0a\x0aMy instances know about the subclass/superclass relationships between classes, contain the description that instances are created from,\x0aand hold the method dictionary that's associated with each class.\x0a\x0aI also provides methods for compiling methods, examining the method dictionary, and iterating over the class hierarchy.";
 smalltalk.addMethod(
@@ -225,13 +226,10 @@ category: 'private',
 fn: function (aMethod){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-
-		smalltalk.removeMethod(aMethod)
-		smalltalk.init(self);
-	;
+smalltalk.removeMethod(aMethod,self);
 return self}, function($ctx1) {$ctx1.fill(self,"basicRemoveCompiledMethod:",{aMethod:aMethod},smalltalk.Behavior)})},
 args: ["aMethod"],
-source: "basicRemoveCompiledMethod: aMethod\x0a\x09<\x0a\x09\x09smalltalk.removeMethod(aMethod)\x0a\x09\x09smalltalk.init(self);\x0a\x09>",
+source: "basicRemoveCompiledMethod: aMethod\x0a\x09<smalltalk.removeMethod(aMethod,self)>",
 messageSends: [],
 referencedClasses: []
 }),
@@ -2144,5 +2142,4 @@ referencedClasses: []
 }),
 smalltalk.ClassSorterNode.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Kernel-Collections.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Kernel-Collections');
+
 smalltalk.addClass('Association', smalltalk.Object, ['key', 'value'], 'Kernel-Collections');
 smalltalk.addMethod(
 smalltalk.method({
@@ -4284,5 +4285,4 @@ messageSends: ["nextPutAll:", "tab"]}),
 smalltalk.StringStream);
 
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Kernel-Collections.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Kernel-Collections');
+
 smalltalk.addClass('Association', smalltalk.Object, ['key', 'value'], 'Kernel-Collections');
 smalltalk.Association.comment="I represent a pair of associated objects, a key and a value. My instances can serve as entries in a dictionary.\x0a\x0aInstances can be created with the class-side method `#key:value:`";
 smalltalk.addMethod(
@@ -5768,5 +5769,4 @@ referencedClasses: ["String"]
 smalltalk.StringStream);
 
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Kernel-Exceptions.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Kernel-Exceptions');
+
 smalltalk.addClass('Error', smalltalk.Object, ['messageText'], 'Kernel-Exceptions');
 smalltalk.addMethod(
 smalltalk.method({
@@ -451,5 +452,4 @@ return self}, function($ctx1) {$ctx1.fill(self,"setCurrent:",{anHandler:anHandle
 messageSends: []}),
 smalltalk.ErrorHandler.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Kernel-Exceptions.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Kernel-Exceptions');
+
 smalltalk.addClass('Error', smalltalk.Object, ['messageText'], 'Kernel-Exceptions');
 smalltalk.Error.comment="From the ANSI standard:\x0a\x0aThis protocol describes the behavior of instances of class `Error`.\x0aThese are used to represent error conditions that prevent the normal continuation of processing.\x0aActual error exceptions used by an application may be subclasses of this class.\x0aAs `Error` is explicitly specified to be subclassable, conforming implementations must implement its behavior in a non-fragile manner.";
 smalltalk.addMethod(
@@ -626,5 +627,4 @@ referencedClasses: []
 }),
 smalltalk.ErrorHandler.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1736 - 0
js/Kernel-Infrastructure.deploy.js

@@ -0,0 +1,1736 @@
+(function(smalltalk,nil,_st){
+smalltalk.addPackage('Kernel-Infrastructure');
+
+smalltalk.addClass('InspectorHandler', smalltalk.Object, [], 'Kernel-Infrastructure');
+
+smalltalk.InspectorHandler.klass.iVarNames = ['inspector'];
+smalltalk.addMethod(
+smalltalk.method({
+selector: "inspect:",
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(self._inspector())._inspect_(anObject);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.InspectorHandler.klass)})},
+messageSends: ["inspect:", "inspector"]}),
+smalltalk.InspectorHandler.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "inspector",
+fn: function (){
+var self=this;
+function $Transcript(){return smalltalk.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@inspector"];
+if(($receiver = $2) == nil || $receiver == undefined){
+self["@inspector"]=$Transcript();
+$1=self["@inspector"];
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"inspector",{},smalltalk.InspectorHandler.klass)})},
+messageSends: ["ifNil:"]}),
+smalltalk.InspectorHandler.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "register:",
+fn: function (anInspector){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self["@inspector"]=anInspector;
+return self}, function($ctx1) {$ctx1.fill(self,"register:",{anInspector:anInspector},smalltalk.InspectorHandler.klass)})},
+messageSends: []}),
+smalltalk.InspectorHandler.klass);
+
+
+smalltalk.addClass('InterfacingObject', smalltalk.Object, [], 'Kernel-Infrastructure');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "ajax:",
+fn: function (anObject){
+var self=this;
+function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st($PlatformInterface())._ajax_(anObject);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"ajax:",{anObject:anObject},smalltalk.InterfacingObject)})},
+messageSends: ["ajax:"]}),
+smalltalk.InterfacingObject);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "alert:",
+fn: function (aString){
+var self=this;
+function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st($PlatformInterface())._alert_(aString);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},smalltalk.InterfacingObject)})},
+messageSends: ["alert:"]}),
+smalltalk.InterfacingObject);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "confirm:",
+fn: function (aString){
+var self=this;
+function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st($PlatformInterface())._confirm_(aString);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"confirm:",{aString:aString},smalltalk.InterfacingObject)})},
+messageSends: ["confirm:"]}),
+smalltalk.InterfacingObject);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "prompt:",
+fn: function (aString){
+var self=this;
+function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st($PlatformInterface())._prompt_(aString);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"prompt:",{aString:aString},smalltalk.InterfacingObject)})},
+messageSends: ["prompt:"]}),
+smalltalk.InterfacingObject);
+
+
+
+smalltalk.addClass('Environment', smalltalk.InterfacingObject, [], 'Kernel-Infrastructure');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "addInstVarNamed:to:",
+fn: function (aString,aClass){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+$1=_st(_st(aClass)._instanceVariableNames())._copy();
+_st($1)._add_(aString);
+$2=_st($1)._yourself();
+_st(self._classBuilder())._addSubclassOf_named_instanceVariableNames_package_(_st(aClass)._superclass(),_st(aClass)._name(),$2,_st(_st(aClass)._package())._name());
+return self}, function($ctx1) {$ctx1.fill(self,"addInstVarNamed:to:",{aString:aString,aClass:aClass},smalltalk.Environment)})},
+messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "superclass", "name", "add:", "copy", "instanceVariableNames", "yourself", "package", "classBuilder"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "allSelectors",
+fn: function (){
+var self=this;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(_st($Smalltalk())._current())._at_("allSelectors"))._value();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"allSelectors",{},smalltalk.Environment)})},
+messageSends: ["value", "at:", "current"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "availableClassNames",
+fn: function (){
+var self=this;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(_st($Smalltalk())._current())._classes())._collect_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(each)._name();
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"availableClassNames",{},smalltalk.Environment)})},
+messageSends: ["collect:", "name", "classes", "current"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "availablePackageNames",
+fn: function (){
+var self=this;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(_st($Smalltalk())._current())._packages())._collect_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(each)._name();
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"availablePackageNames",{},smalltalk.Environment)})},
+messageSends: ["collect:", "name", "packages", "current"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "availableProtocolsFor:",
+fn: function (aClass){
+var self=this;
+var protocols;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+protocols=_st(aClass)._protocols();
+$1=_st(aClass)._superclass();
+if(($receiver = $1) == nil || $receiver == undefined){
+$1;
+} else {
+_st(protocols)._addAll_(self._availableProtocolsFor_(_st(aClass)._superclass()));
+};
+$2=_st(_st(protocols)._asSet())._asArray();
+return $2;
+}, function($ctx1) {$ctx1.fill(self,"availableProtocolsFor:",{aClass:aClass,protocols:protocols},smalltalk.Environment)})},
+messageSends: ["protocols", "ifNotNil:", "addAll:", "availableProtocolsFor:", "superclass", "asArray", "asSet"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "classBuilder",
+fn: function (){
+var self=this;
+function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st($ClassBuilder())._new();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"classBuilder",{},smalltalk.Environment)})},
+messageSends: ["new"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "classNamed:",
+fn: function (aString){
+var self=this;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=_st(_st($Smalltalk())._current())._at_(_st(aString)._asSymbol());
+if(($receiver = $2) == nil || $receiver == undefined){
+$1=self._error_("Invalid class name");
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"classNamed:",{aString:aString},smalltalk.Environment)})},
+messageSends: ["ifNil:", "error:", "at:", "asSymbol", "current"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "classes",
+fn: function (){
+var self=this;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st($Smalltalk())._current())._classes();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Environment)})},
+messageSends: ["classes", "current"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "commitPackage:",
+fn: function (aPackage){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(aPackage)._commit();
+return self}, function($ctx1) {$ctx1.fill(self,"commitPackage:",{aPackage:aPackage},smalltalk.Environment)})},
+messageSends: ["commit"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "compileClassComment:for:",
+fn: function (aString,aClass){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(aClass)._comment_(aString);
+return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment:for:",{aString:aString,aClass:aClass},smalltalk.Environment)})},
+messageSends: ["comment:"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "compileClassDefinition:",
+fn: function (aString){
+var self=this;
+function $DoIt(){return smalltalk.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
+return smalltalk.withContext(function($ctx1) { 
+self._eval_on_(aString,_st($DoIt())._new());
+return self}, function($ctx1) {$ctx1.fill(self,"compileClassDefinition:",{aString:aString},smalltalk.Environment)})},
+messageSends: ["eval:on:", "new"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "compileMethod:for:protocol:",
+fn: function (sourceCode,class_,protocol){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(class_)._compile_category_(sourceCode,protocol);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"compileMethod:for:protocol:",{sourceCode:sourceCode,class_:class_,protocol:protocol},smalltalk.Environment)})},
+messageSends: ["compile:category:"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "copyClass:to:",
+fn: function (aClass,aClassName){
+var self=this;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st($Smalltalk())._current())._at_(aClassName);
+if(($receiver = $1) == nil || $receiver == undefined){
+$1;
+} else {
+self._error_(_st("A class named ".__comma(aClassName)).__comma(" already exists"));
+};
+_st(_st($ClassBuilder())._new())._copyClass_named_(aClass,aClassName);
+return self}, function($ctx1) {$ctx1.fill(self,"copyClass:to:",{aClass:aClass,aClassName:aClassName},smalltalk.Environment)})},
+messageSends: ["ifNotNil:", "error:", ",", "at:", "current", "copyClass:named:", "new"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "eval:on:",
+fn: function (aString,aReceiver){
+var self=this;
+var compiler;
+function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
+function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+var $early={};
+try {
+compiler=_st($Compiler())._new();
+_st((function(){
+return smalltalk.withContext(function($ctx2) {
+return _st(compiler)._parseExpression_(aString);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_($Error(),(function(ex){
+return smalltalk.withContext(function($ctx2) {
+$1=self._alert_(_st(ex)._messageText());
+throw $early=[$1];
+}, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
+$2=_st(compiler)._evaluateExpression_on_(aString,aReceiver);
+return $2;
+}
+catch(e) {if(e===$early)return e[0]; throw e}
+}, function($ctx1) {$ctx1.fill(self,"eval:on:",{aString:aString,aReceiver:aReceiver,compiler:compiler},smalltalk.Environment)})},
+messageSends: ["new", "on:do:", "alert:", "messageText", "parseExpression:", "evaluateExpression:on:"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "evaluate:on:do:",
+fn: function (aBlock,anErrorClass,exceptionBlock){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+self._try_catch_(aBlock,(function(exception){
+return smalltalk.withContext(function($ctx2) {
+$1=_st(exception)._isKindOf_(self._classNamed_(_st(anErrorClass)._name()));
+if(smalltalk.assert($1)){
+return _st(exceptionBlock)._value_(exception);
+} else {
+return _st(exception)._signal();
+};
+}, function($ctx2) {$ctx2.fillBlock({exception:exception},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"evaluate:on:do:",{aBlock:aBlock,anErrorClass:anErrorClass,exceptionBlock:exceptionBlock},smalltalk.Environment)})},
+messageSends: ["try:catch:", "ifTrue:ifFalse:", "value:", "signal", "isKindOf:", "classNamed:", "name"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "inspect:",
+fn: function (anObject){
+var self=this;
+function $InspectorHandler(){return smalltalk.InspectorHandler||(typeof InspectorHandler=="undefined"?nil:InspectorHandler)}
+return smalltalk.withContext(function($ctx1) { 
+_st(_st($InspectorHandler())._inspector())._inspect_(anObject);
+return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.Environment)})},
+messageSends: ["inspect:", "inspector"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "moveClass:toPackage:",
+fn: function (aClass,aPackageName){
+var self=this;
+var package_;
+function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2,$3;
+package_=_st($Package())._named_(aPackageName);
+$1=package_;
+if(($receiver = $1) == nil || $receiver == undefined){
+self._error_("Invalid package name");
+} else {
+$1;
+};
+$2=_st(package_).__eq_eq(_st(aClass)._package());
+if(smalltalk.assert($2)){
+$3=self;
+return $3;
+};
+_st(aClass)._package_(package_);
+return self}, function($ctx1) {$ctx1.fill(self,"moveClass:toPackage:",{aClass:aClass,aPackageName:aPackageName,package_:package_},smalltalk.Environment)})},
+messageSends: ["named:", "ifNil:", "error:", "ifTrue:", "==", "package", "package:"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "moveMethod:toClass:",
+fn: function (aMethod,aClassName){
+var self=this;
+var destinationClass;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2,$3;
+destinationClass=_st(_st($Smalltalk())._current())._at_(_st(aClassName)._asSymbol());
+$1=destinationClass;
+if(($receiver = $1) == nil || $receiver == undefined){
+self._error_("Invalid class name");
+} else {
+$1;
+};
+$2=_st(destinationClass).__eq_eq(_st(aMethod)._methodClass());
+if(smalltalk.assert($2)){
+$3=self;
+return $3;
+};
+_st(destinationClass)._compile_category_(_st(aMethod)._source(),_st(aMethod)._protocol());
+_st(_st(aMethod)._methodClass())._removeCompiledMethod_(aMethod);
+return self}, function($ctx1) {$ctx1.fill(self,"moveMethod:toClass:",{aMethod:aMethod,aClassName:aClassName,destinationClass:destinationClass},smalltalk.Environment)})},
+messageSends: ["at:", "asSymbol", "current", "ifNil:", "error:", "ifTrue:", "==", "methodClass", "compile:category:", "source", "protocol", "removeCompiledMethod:"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "moveMethod:toProtocol:",
+fn: function (aMethod,aProtocol){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(aMethod)._category_(aProtocol);
+return self}, function($ctx1) {$ctx1.fill(self,"moveMethod:toProtocol:",{aMethod:aMethod,aProtocol:aProtocol},smalltalk.Environment)})},
+messageSends: ["category:"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "packages",
+fn: function (){
+var self=this;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st($Smalltalk())._current())._packages();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"packages",{},smalltalk.Environment)})},
+messageSends: ["packages", "current"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "registerErrorHandler:",
+fn: function (anErrorHandler){
+var self=this;
+function $ErrorHandler(){return smalltalk.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
+return smalltalk.withContext(function($ctx1) { 
+_st($ErrorHandler())._setCurrent_(anErrorHandler);
+return self}, function($ctx1) {$ctx1.fill(self,"registerErrorHandler:",{anErrorHandler:anErrorHandler},smalltalk.Environment)})},
+messageSends: ["setCurrent:"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "registerInspector:",
+fn: function (anInspector){
+var self=this;
+function $InspectorHandler(){return smalltalk.InspectorHandler||(typeof InspectorHandler=="undefined"?nil:InspectorHandler)}
+return smalltalk.withContext(function($ctx1) { 
+_st($InspectorHandler())._register_(anInspector);
+return self}, function($ctx1) {$ctx1.fill(self,"registerInspector:",{anInspector:anInspector},smalltalk.Environment)})},
+messageSends: ["register:"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "registerProgressHandler:",
+fn: function (aProgressHandler){
+var self=this;
+function $ProgressHandler(){return smalltalk.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
+return smalltalk.withContext(function($ctx1) { 
+_st($ProgressHandler())._setCurrent_(aProgressHandler);
+return self}, function($ctx1) {$ctx1.fill(self,"registerProgressHandler:",{aProgressHandler:aProgressHandler},smalltalk.Environment)})},
+messageSends: ["setCurrent:"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "removeClass:",
+fn: function (aClass){
+var self=this;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+return smalltalk.withContext(function($ctx1) { 
+_st(_st($Smalltalk())._current())._removeClass_(aClass);
+return self}, function($ctx1) {$ctx1.fill(self,"removeClass:",{aClass:aClass},smalltalk.Environment)})},
+messageSends: ["removeClass:", "current"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "removeMethod:",
+fn: function (aMethod){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(aMethod)._methodClass())._removeCompiledMethod_(aMethod);
+return self}, function($ctx1) {$ctx1.fill(self,"removeMethod:",{aMethod:aMethod},smalltalk.Environment)})},
+messageSends: ["removeCompiledMethod:", "methodClass"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "removeProtocol:from:",
+fn: function (aString,aClass){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(_st(aClass)._methods())._select_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(_st(each)._protocol()).__eq(aString);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(aClass)._removeCompiledMethod_(each);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"removeProtocol:from:",{aString:aString,aClass:aClass},smalltalk.Environment)})},
+messageSends: ["do:", "removeCompiledMethod:", "select:", "=", "protocol", "methods"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renameClass:to:",
+fn: function (aClass,aClassName){
+var self=this;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st($Smalltalk())._current())._at_(aClassName);
+if(($receiver = $1) == nil || $receiver == undefined){
+$1;
+} else {
+self._error_(_st("A class named ".__comma(aClassName)).__comma(" already exists"));
+};
+_st(_st($ClassBuilder())._new())._renameClass_to_(aClass,aClassName);
+return self}, function($ctx1) {$ctx1.fill(self,"renameClass:to:",{aClass:aClass,aClassName:aClassName},smalltalk.Environment)})},
+messageSends: ["ifNotNil:", "error:", ",", "at:", "current", "renameClass:to:", "new"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renameProtocol:to:in:",
+fn: function (aString,anotherString,aClass){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(_st(aClass)._methods())._select_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(_st(each)._protocol()).__eq(aString);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(each)._protocol_(anotherString);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"renameProtocol:to:in:",{aString:aString,anotherString:anotherString,aClass:aClass},smalltalk.Environment)})},
+messageSends: ["do:", "protocol:", "select:", "=", "protocol", "methods"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "setClassCommentOf:to:",
+fn: function (aClass,aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(aClass)._comment_(aString);
+return self}, function($ctx1) {$ctx1.fill(self,"setClassCommentOf:to:",{aClass:aClass,aString:aString},smalltalk.Environment)})},
+messageSends: ["comment:"]}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "systemAnnouncer",
+fn: function (){
+var self=this;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(_st($Smalltalk())._current())._at_("SystemAnnouncer"))._current();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"systemAnnouncer",{},smalltalk.Environment)})},
+messageSends: ["current", "at:"]}),
+smalltalk.Environment);
+
+
+
+smalltalk.addClass('JSObjectProxy', smalltalk.Object, ['jsObject'], 'Kernel-Infrastructure');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "addObjectVariablesTo:",
+fn: function (aDictionary){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+
+		for(var i in self['@jsObject']) {
+			aDictionary._at_put_(i, self['@jsObject'][i]);
+		}
+	;
+return self}, function($ctx1) {$ctx1.fill(self,"addObjectVariablesTo:",{aDictionary:aDictionary},smalltalk.JSObjectProxy)})},
+messageSends: []}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "at:",
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self['@jsObject'][aString];
+return self}, function($ctx1) {$ctx1.fill(self,"at:",{aString:aString},smalltalk.JSObjectProxy)})},
+messageSends: []}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "at:ifAbsent:",
+fn: function (aString,aBlock){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+
+		var obj = self['@jsObject'];
+		return aString in obj ? obj[aString] : aBlock._value();
+	;
+return self}, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{aString:aString,aBlock:aBlock},smalltalk.JSObjectProxy)})},
+messageSends: []}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "at:ifPresent:",
+fn: function (aString,aBlock){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+
+		var obj = self['@jsObject'];
+		return aString in obj ? aBlock._value_(obj[aString]) : nil;
+	;
+return self}, function($ctx1) {$ctx1.fill(self,"at:ifPresent:",{aString:aString,aBlock:aBlock},smalltalk.JSObjectProxy)})},
+messageSends: []}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "at:ifPresent:ifAbsent:",
+fn: function (aString,aBlock,anotherBlock){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+
+		var obj = self['@jsObject'];
+		return aString in obj ? aBlock._value_(obj[aString]) : anotherBlock._value();
+	;
+return self}, function($ctx1) {$ctx1.fill(self,"at:ifPresent:ifAbsent:",{aString:aString,aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.JSObjectProxy)})},
+messageSends: []}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "at:put:",
+fn: function (aString,anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self['@jsObject'][aString] = anObject;
+return self}, function($ctx1) {$ctx1.fill(self,"at:put:",{aString:aString,anObject:anObject},smalltalk.JSObjectProxy)})},
+messageSends: []}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "doesNotUnderstand:",
+fn: function (aMessage){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self._lookupProperty_(_st(_st(aMessage)._selector())._asJavaScriptSelector());
+if(($receiver = $2) == nil || $receiver == undefined){
+$1=smalltalk.JSObjectProxy.superclass.fn.prototype._doesNotUnderstand_.apply(_st(self), [aMessage]);
+} else {
+var jsSelector;
+jsSelector=$receiver;
+$1=self._forwardMessage_withArguments_(jsSelector,_st(aMessage)._arguments());
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"doesNotUnderstand:",{aMessage:aMessage},smalltalk.JSObjectProxy)})},
+messageSends: ["ifNil:ifNotNil:", "doesNotUnderstand:", "forwardMessage:withArguments:", "arguments", "lookupProperty:", "asJavaScriptSelector", "selector"]}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "forwardMessage:withArguments:",
+fn: function (aString,anArray){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+
+		return smalltalk.send(self._jsObject(), aString, anArray);
+	;
+return self}, function($ctx1) {$ctx1.fill(self,"forwardMessage:withArguments:",{aString:aString,anArray:anArray},smalltalk.JSObjectProxy)})},
+messageSends: []}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "inspectOn:",
+fn: function (anInspector){
+var self=this;
+var variables;
+function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
+return smalltalk.withContext(function($ctx1) { 
+variables=_st($Dictionary())._new();
+_st(variables)._at_put_("#self",self._jsObject());
+_st(anInspector)._setLabel_(self._printString());
+self._addObjectVariablesTo_(variables);
+_st(anInspector)._setVariables_(variables);
+return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.JSObjectProxy)})},
+messageSends: ["new", "at:put:", "jsObject", "setLabel:", "printString", "addObjectVariablesTo:", "setVariables:"]}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "jsObject",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=self["@jsObject"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"jsObject",{},smalltalk.JSObjectProxy)})},
+messageSends: []}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "jsObject:",
+fn: function (aJSObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self["@jsObject"]=aJSObject;
+return self}, function($ctx1) {$ctx1.fill(self,"jsObject:",{aJSObject:aJSObject},smalltalk.JSObjectProxy)})},
+messageSends: []}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "keysAndValuesDo:",
+fn: function (aBlock){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+
+		var o = self['@jsObject'];
+		for(var i in o) {
+			aBlock._value_value_(i, o[i]);
+		}
+	;
+return self}, function($ctx1) {$ctx1.fill(self,"keysAndValuesDo:",{aBlock:aBlock},smalltalk.JSObjectProxy)})},
+messageSends: []}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "lookupProperty:",
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return aString in self._jsObject() ? aString : nil;
+return self}, function($ctx1) {$ctx1.fill(self,"lookupProperty:",{aString:aString},smalltalk.JSObjectProxy)})},
+messageSends: []}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "printOn:",
+fn: function (aStream){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(aStream)._nextPutAll_(_st(self._jsObject())._toString());
+return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.JSObjectProxy)})},
+messageSends: ["nextPutAll:", "toString", "jsObject"]}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "value",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=self._at_ifAbsent_("value",(function(){
+return smalltalk.withContext(function($ctx2) {
+return smalltalk.JSObjectProxy.superclass.fn.prototype._value.apply(_st(self), []);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.JSObjectProxy)})},
+messageSends: ["at:ifAbsent:", "value"]}),
+smalltalk.JSObjectProxy);
+
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "on:",
+fn: function (aJSObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$3,$1;
+$2=self._new();
+_st($2)._jsObject_(aJSObject);
+$3=_st($2)._yourself();
+$1=$3;
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"on:",{aJSObject:aJSObject},smalltalk.JSObjectProxy.klass)})},
+messageSends: ["jsObject:", "new", "yourself"]}),
+smalltalk.JSObjectProxy.klass);
+
+
+smalltalk.addClass('Organizer', smalltalk.Object, [], 'Kernel-Infrastructure');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "addElement:",
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self.elements.addElement(anObject);
+return self}, function($ctx1) {$ctx1.fill(self,"addElement:",{anObject:anObject},smalltalk.Organizer)})},
+messageSends: []}),
+smalltalk.Organizer);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "elements",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(self._basicAt_("elements"))._copy();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"elements",{},smalltalk.Organizer)})},
+messageSends: ["copy", "basicAt:"]}),
+smalltalk.Organizer);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "removeElement:",
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self.elements.removeElement(anObject);
+return self}, function($ctx1) {$ctx1.fill(self,"removeElement:",{anObject:anObject},smalltalk.Organizer)})},
+messageSends: []}),
+smalltalk.Organizer);
+
+
+
+smalltalk.addClass('ClassOrganizer', smalltalk.Organizer, [], 'Kernel-Infrastructure');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "addElement:",
+fn: function (aString){
+var self=this;
+function $ProtocolAdded(){return smalltalk.ProtocolAdded||(typeof ProtocolAdded=="undefined"?nil:ProtocolAdded)}
+function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+smalltalk.ClassOrganizer.superclass.fn.prototype._addElement_.apply(_st(self), [aString]);
+$1=_st($ProtocolAdded())._new();
+_st($1)._protocol_(aString);
+_st($1)._theClass_(self._theClass());
+$2=_st($1)._yourself();
+_st(_st($SystemAnnouncer())._current())._announce_($2);
+return self}, function($ctx1) {$ctx1.fill(self,"addElement:",{aString:aString},smalltalk.ClassOrganizer)})},
+messageSends: ["addElement:", "announce:", "protocol:", "new", "theClass:", "theClass", "yourself", "current"]}),
+smalltalk.ClassOrganizer);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "removeElement:",
+fn: function (aString){
+var self=this;
+function $ProtocolRemoved(){return smalltalk.ProtocolRemoved||(typeof ProtocolRemoved=="undefined"?nil:ProtocolRemoved)}
+function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+smalltalk.ClassOrganizer.superclass.fn.prototype._removeElement_.apply(_st(self), [aString]);
+$1=_st($ProtocolRemoved())._new();
+_st($1)._protocol_(aString);
+_st($1)._theClass_(self._theClass());
+$2=_st($1)._yourself();
+_st(_st($SystemAnnouncer())._current())._announce_($2);
+return self}, function($ctx1) {$ctx1.fill(self,"removeElement:",{aString:aString},smalltalk.ClassOrganizer)})},
+messageSends: ["removeElement:", "announce:", "protocol:", "new", "theClass:", "theClass", "yourself", "current"]}),
+smalltalk.ClassOrganizer);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "theClass",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+ return self.theClass ;
+return self}, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ClassOrganizer)})},
+messageSends: []}),
+smalltalk.ClassOrganizer);
+
+
+
+smalltalk.addClass('PackageOrganizer', smalltalk.Organizer, [], 'Kernel-Infrastructure');
+
+
+smalltalk.addClass('Package', smalltalk.Object, ['extension'], 'Kernel-Infrastructure');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "classes",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(self._organization())._elements();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Package)})},
+messageSends: ["elements", "organization"]}),
+smalltalk.Package);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "isPackage",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return true;
+}, function($ctx1) {$ctx1.fill(self,"isPackage",{},smalltalk.Package)})},
+messageSends: []}),
+smalltalk.Package);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "loadDependencies",
+fn: function (){
+var self=this;
+var classes,packages;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$3,$1;
+classes=self._loadDependencyClasses();
+$2=_st(_st(classes)._collect_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(each)._package();
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._asSet();
+_st($2)._remove_ifAbsent_(self,(function(){
+return smalltalk.withContext(function($ctx2) {
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+$3=_st($2)._yourself();
+$1=$3;
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"loadDependencies",{classes:classes,packages:packages},smalltalk.Package)})},
+messageSends: ["loadDependencyClasses", "remove:ifAbsent:", "asSet", "collect:", "package", "yourself"]}),
+smalltalk.Package);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "loadDependencyClasses",
+fn: function (){
+var self=this;
+var starCategoryName;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+return smalltalk.withContext(function($ctx1) { 
+var $2,$3,$1;
+starCategoryName="*".__comma(self._name());
+$2=_st(_st(self._classes())._collect_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(each)._superclass();
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._asSet();
+_st($2)._remove_ifAbsent_(nil,(function(){
+return smalltalk.withContext(function($ctx2) {
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+_st($2)._addAll_(_st(_st(_st($Smalltalk())._current())._classes())._select_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(_st(each)._protocols())._includes_(starCategoryName);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})));
+$3=_st($2)._yourself();
+$1=$3;
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"loadDependencyClasses",{starCategoryName:starCategoryName},smalltalk.Package)})},
+messageSends: [",", "name", "remove:ifAbsent:", "asSet", "collect:", "superclass", "classes", "addAll:", "select:", "includes:", "protocols", "current", "yourself"]}),
+smalltalk.Package);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "name",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self.pkgName;
+return self}, function($ctx1) {$ctx1.fill(self,"name",{},smalltalk.Package)})},
+messageSends: []}),
+smalltalk.Package);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "name:",
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self.pkgName = aString;
+return self}, function($ctx1) {$ctx1.fill(self,"name:",{aString:aString},smalltalk.Package)})},
+messageSends: []}),
+smalltalk.Package);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "organization",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=self._basicAt_("organization");
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"organization",{},smalltalk.Package)})},
+messageSends: ["basicAt:"]}),
+smalltalk.Package);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "printOn:",
+fn: function (aStream){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+smalltalk.Package.superclass.fn.prototype._printOn_.apply(_st(self), [aStream]);
+$1=aStream;
+_st($1)._nextPutAll_(" (");
+_st($1)._nextPutAll_(self._name());
+$2=_st($1)._nextPutAll_(")");
+return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Package)})},
+messageSends: ["printOn:", "nextPutAll:", "name"]}),
+smalltalk.Package);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "setupClasses",
+fn: function (){
+var self=this;
+function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+$1=self._classes();
+_st($1)._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(_st($ClassBuilder())._new())._setupClass_(each);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+$2=_st($1)._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(each)._initialize();
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"setupClasses",{},smalltalk.Package)})},
+messageSends: ["do:", "setupClass:", "new", "classes", "initialize"]}),
+smalltalk.Package);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "sortedClasses",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(self._class())._sortedClasses_(self._classes());
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"sortedClasses",{},smalltalk.Package)})},
+messageSends: ["sortedClasses:", "classes", "class"]}),
+smalltalk.Package);
+
+
+smalltalk.Package.klass.iVarNames = ['defaultCommitPathJs','defaultCommitPathSt'];
+smalltalk.addMethod(
+smalltalk.method({
+selector: "load:",
+fn: function (aPackageName){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self._deprecatedAPI();
+self._load_prefix_(aPackageName,_st(self._defaultCommitPathJs()).__comma("/"));
+return self}, function($ctx1) {$ctx1.fill(self,"load:",{aPackageName:aPackageName},smalltalk.Package.klass)})},
+messageSends: ["deprecatedAPI", "load:prefix:", ",", "defaultCommitPathJs"]}),
+smalltalk.Package.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "load:prefix:",
+fn: function (aPackageName,aPrefix){
+var self=this;
+function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
+function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
+return smalltalk.withContext(function($ctx1) { 
+self._deprecatedAPI();
+_st($PlatformInterface())._ajax_(smalltalk.HashedCollection._from_(["url".__minus_gt(_st(_st(aPrefix).__comma(aPackageName)).__comma(".js")),"dataType".__minus_gt("script"),"success".__minus_gt((function(){
+return smalltalk.withContext(function($ctx2) {
+return _st(_st($Package())._named_(aPackageName))._setupClasses();
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))]));
+return self}, function($ctx1) {$ctx1.fill(self,"load:prefix:",{aPackageName:aPackageName,aPrefix:aPrefix},smalltalk.Package.klass)})},
+messageSends: ["deprecatedAPI", "ajax:", "->", ",", "setupClasses", "named:"]}),
+smalltalk.Package.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "named:",
+fn: function (aPackageName){
+var self=this;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st($Smalltalk())._current())._packageAt_(aPackageName);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"named:",{aPackageName:aPackageName},smalltalk.Package.klass)})},
+messageSends: ["packageAt:", "current"]}),
+smalltalk.Package.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "named:ifAbsent:",
+fn: function (aPackageName,aBlock){
+var self=this;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st($Smalltalk())._current())._packageAt_ifAbsent_(aPackageName,aBlock);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"named:ifAbsent:",{aPackageName:aPackageName,aBlock:aBlock},smalltalk.Package.klass)})},
+messageSends: ["packageAt:ifAbsent:", "current"]}),
+smalltalk.Package.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "sortedClasses:",
+fn: function (classes){
+var self=this;
+var children,others,nodes,expandedClasses;
+function $ClassSorterNode(){return smalltalk.ClassSorterNode||(typeof ClassSorterNode=="undefined"?nil:ClassSorterNode)}
+function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+children=[];
+others=[];
+_st(classes)._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
+$1=_st(classes)._includes_(_st(each)._superclass());
+if(smalltalk.assert($1)){
+return _st(others)._add_(each);
+} else {
+return _st(children)._add_(each);
+};
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+nodes=_st(children)._collect_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st($ClassSorterNode())._on_classes_level_(each,others,(0));
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+nodes=_st(nodes)._sorted_((function(a,b){
+return smalltalk.withContext(function($ctx2) {
+return _st(_st(_st(a)._theClass())._name()).__lt_eq(_st(_st(b)._theClass())._name());
+}, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
+expandedClasses=_st($Array())._new();
+_st(nodes)._do_((function(aNode){
+return smalltalk.withContext(function($ctx2) {
+return _st(aNode)._traverseClassesWith_(expandedClasses);
+}, function($ctx2) {$ctx2.fillBlock({aNode:aNode},$ctx1)})}));
+$2=expandedClasses;
+return $2;
+}, function($ctx1) {$ctx1.fill(self,"sortedClasses:",{classes:classes,children:children,others:others,nodes:nodes,expandedClasses:expandedClasses},smalltalk.Package.klass)})},
+messageSends: ["do:", "ifFalse:ifTrue:", "add:", "includes:", "superclass", "collect:", "on:classes:level:", "sorted:", "<=", "name", "theClass", "new", "traverseClassesWith:"]}),
+smalltalk.Package.klass);
+
+
+smalltalk.addClass('PlatformInterface', smalltalk.Object, [], 'Kernel-Infrastructure');
+
+smalltalk.PlatformInterface.klass.iVarNames = ['worker'];
+smalltalk.addMethod(
+smalltalk.method({
+selector: "ajax:",
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@worker"];
+if(($receiver = $2) == nil || $receiver == undefined){
+$1=self._error_("ajax: not available");
+} else {
+$1=_st(self["@worker"])._ajax_(anObject);
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"ajax:",{anObject:anObject},smalltalk.PlatformInterface.klass)})},
+messageSends: ["ifNotNil:ifNil:", "ajax:", "error:"]}),
+smalltalk.PlatformInterface.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "alert:",
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@worker"];
+if(($receiver = $2) == nil || $receiver == undefined){
+$1=self._error_("alert: not available");
+} else {
+$1=_st(self["@worker"])._alert_(aString);
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},smalltalk.PlatformInterface.klass)})},
+messageSends: ["ifNotNil:ifNil:", "alert:", "error:"]}),
+smalltalk.PlatformInterface.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "confirm:",
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@worker"];
+if(($receiver = $2) == nil || $receiver == undefined){
+$1=self._error_("confirm: not available");
+} else {
+$1=_st(self["@worker"])._confirm_(aString);
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"confirm:",{aString:aString},smalltalk.PlatformInterface.klass)})},
+messageSends: ["ifNotNil:ifNil:", "confirm:", "error:"]}),
+smalltalk.PlatformInterface.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "existsGlobal:",
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+
+	var f = new Function('aString',
+	'if (/^[0-9]/.test(aString) || !/^[\\w_]+$/.test(aString))\n'+
+	'	return false;\n'+
+	'try { eval(aString); return true; } catch (ex) {}\n'+
+	'return false;');
+	return f(aString);;
+return self}, function($ctx1) {$ctx1.fill(self,"existsGlobal:",{aString:aString},smalltalk.PlatformInterface.klass)})},
+messageSends: []}),
+smalltalk.PlatformInterface.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "initialize",
+fn: function (){
+var self=this;
+var candidate;
+function $BrowserInterface(){return smalltalk.BrowserInterface||(typeof BrowserInterface=="undefined"?nil:BrowserInterface)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2,$3;
+smalltalk.PlatformInterface.klass.superclass.fn.prototype._initialize.apply(_st(self), []);
+$1=$BrowserInterface();
+if(($receiver = $1) == nil || $receiver == undefined){
+$1;
+} else {
+candidate=_st($BrowserInterface())._new();
+candidate;
+$2=_st(candidate)._isAvailable();
+if(smalltalk.assert($2)){
+self._setWorker_(candidate);
+$3=self;
+return $3;
+};
+};
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{candidate:candidate},smalltalk.PlatformInterface.klass)})},
+messageSends: ["initialize", "ifNotNil:", "new", "ifTrue:", "setWorker:", "isAvailable"]}),
+smalltalk.PlatformInterface.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "prompt:",
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@worker"];
+if(($receiver = $2) == nil || $receiver == undefined){
+$1=self._error_("prompt: not available");
+} else {
+$1=_st(self["@worker"])._prompt_(aString);
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"prompt:",{aString:aString},smalltalk.PlatformInterface.klass)})},
+messageSends: ["ifNotNil:ifNil:", "prompt:", "error:"]}),
+smalltalk.PlatformInterface.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "setWorker:",
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self["@worker"]=anObject;
+return self}, function($ctx1) {$ctx1.fill(self,"setWorker:",{anObject:anObject},smalltalk.PlatformInterface.klass)})},
+messageSends: []}),
+smalltalk.PlatformInterface.klass);
+
+
+smalltalk.addClass('ProgressHandler', smalltalk.Object, [], 'Kernel-Infrastructure');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "do:on:displaying:",
+fn: function (aBlock,aCollection,aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(aCollection)._do_(aBlock);
+return self}, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString},smalltalk.ProgressHandler)})},
+messageSends: ["do:"]}),
+smalltalk.ProgressHandler);
+
+
+smalltalk.ProgressHandler.klass.iVarNames = ['current'];
+smalltalk.addMethod(
+smalltalk.method({
+selector: "current",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@current"];
+if(($receiver = $2) == nil || $receiver == undefined){
+self["@current"]=self._new();
+$1=self["@current"];
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.ProgressHandler.klass)})},
+messageSends: ["ifNil:", "new"]}),
+smalltalk.ProgressHandler.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "initialize",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self._register();
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.ProgressHandler.klass)})},
+messageSends: ["register"]}),
+smalltalk.ProgressHandler.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "register",
+fn: function (){
+var self=this;
+function $ProgressHandler(){return smalltalk.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
+return smalltalk.withContext(function($ctx1) { 
+_st($ProgressHandler())._setCurrent_(self._new());
+return self}, function($ctx1) {$ctx1.fill(self,"register",{},smalltalk.ProgressHandler.klass)})},
+messageSends: ["setCurrent:", "new"]}),
+smalltalk.ProgressHandler.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "setCurrent:",
+fn: function (anHandler){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self["@current"]=anHandler;
+return self}, function($ctx1) {$ctx1.fill(self,"setCurrent:",{anHandler:anHandler},smalltalk.ProgressHandler.klass)})},
+messageSends: []}),
+smalltalk.ProgressHandler.klass);
+
+
+smalltalk.addClass('Smalltalk', smalltalk.Object, [], 'Kernel-Infrastructure');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "addGlobalJsVariable:",
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(self._globalJsVariables())._add_(aString);
+return self}, function($ctx1) {$ctx1.fill(self,"addGlobalJsVariable:",{aString:aString},smalltalk.Smalltalk)})},
+messageSends: ["add:", "globalJsVariables"]}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "asSmalltalkException:",
+fn: function (anObject){
+var self=this;
+function $JavaScriptException(){return smalltalk.JavaScriptException||(typeof JavaScriptException=="undefined"?nil:JavaScriptException)}
+function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=_st(self._isSmalltalkObject_(anObject))._and_((function(){
+return smalltalk.withContext(function($ctx2) {
+return _st(anObject)._isKindOf_($Error());
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+if(smalltalk.assert($2)){
+$1=anObject;
+} else {
+$1=_st($JavaScriptException())._on_(anObject);
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"asSmalltalkException:",{anObject:anObject},smalltalk.Smalltalk)})},
+messageSends: ["ifTrue:ifFalse:", "on:", "and:", "isKindOf:", "isSmalltalkObject:"]}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "at:",
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self[aString];
+return self}, function($ctx1) {$ctx1.fill(self,"at:",{aString:aString},smalltalk.Smalltalk)})},
+messageSends: []}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "basicParse:",
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return smalltalk.parser.parse(aString);
+return self}, function($ctx1) {$ctx1.fill(self,"basicParse:",{aString:aString},smalltalk.Smalltalk)})},
+messageSends: []}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "classes",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self.classes();
+return self}, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Smalltalk)})},
+messageSends: []}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "createPackage:",
+fn: function (packageName){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return smalltalk.addPackage(packageName);
+return self}, function($ctx1) {$ctx1.fill(self,"createPackage:",{packageName:packageName},smalltalk.Smalltalk)})},
+messageSends: []}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "createPackage:properties:",
+fn: function (packageName,aDict){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+self._deprecatedAPI();
+$1=_st(aDict)._isEmpty();
+if(! smalltalk.assert($1)){
+self._error_("createPackage:properties: called with nonempty properties");
+};
+$2=self._createPackage_(packageName);
+return $2;
+}, function($ctx1) {$ctx1.fill(self,"createPackage:properties:",{packageName:packageName,aDict:aDict},smalltalk.Smalltalk)})},
+messageSends: ["deprecatedAPI", "ifFalse:", "error:", "isEmpty", "createPackage:"]}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "deleteClass:",
+fn: function (aClass){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self.removeClass(aClass);
+return self}, function($ctx1) {$ctx1.fill(self,"deleteClass:",{aClass:aClass},smalltalk.Smalltalk)})},
+messageSends: []}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "deleteGlobalJsVariable:",
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(self._globalJsVariables())._remove_ifAbsent_(aString,(function(){
+return smalltalk.withContext(function($ctx2) {
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"deleteGlobalJsVariable:",{aString:aString},smalltalk.Smalltalk)})},
+messageSends: ["remove:ifAbsent:", "globalJsVariables"]}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "deletePackage:",
+fn: function (packageName){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+delete smalltalk.packages[packageName];
+return self}, function($ctx1) {$ctx1.fill(self,"deletePackage:",{packageName:packageName},smalltalk.Smalltalk)})},
+messageSends: []}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "globalJsVariables",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self.globalJsVariables;
+return self}, function($ctx1) {$ctx1.fill(self,"globalJsVariables",{},smalltalk.Smalltalk)})},
+messageSends: []}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "isSmalltalkObject:",
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return typeof anObject.klass !== 'undefined';
+return self}, function($ctx1) {$ctx1.fill(self,"isSmalltalkObject:",{anObject:anObject},smalltalk.Smalltalk)})},
+messageSends: []}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "packageAt:",
+fn: function (packageName){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self.packages[packageName];
+return self}, function($ctx1) {$ctx1.fill(self,"packageAt:",{packageName:packageName},smalltalk.Smalltalk)})},
+messageSends: []}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "packageAt:ifAbsent:",
+fn: function (packageName,aBlock){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self._packageAt_(packageName);
+$1=_st($2)._ifNil_(aBlock);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"packageAt:ifAbsent:",{packageName:packageName,aBlock:aBlock},smalltalk.Smalltalk)})},
+messageSends: ["ifNil:", "packageAt:"]}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "packages",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self.packages.all();
+return self}, function($ctx1) {$ctx1.fill(self,"packages",{},smalltalk.Smalltalk)})},
+messageSends: []}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "parse:",
+fn: function (aString){
+var self=this;
+var result;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$3,$1;
+self._try_catch_((function(){
+return smalltalk.withContext(function($ctx2) {
+result=self._basicParse_(aString);
+return result;
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(ex){
+return smalltalk.withContext(function($ctx2) {
+return _st(self._parseError_parsing_(ex,aString))._signal();
+}, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
+$2=result;
+_st($2)._source_(aString);
+$3=_st($2)._yourself();
+$1=$3;
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"parse:",{aString:aString,result:result},smalltalk.Smalltalk)})},
+messageSends: ["try:catch:", "basicParse:", "signal", "parseError:parsing:", "source:", "yourself"]}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "parseError:parsing:",
+fn: function (anException,aString){
+var self=this;
+function $ParseError(){return smalltalk.ParseError||(typeof ParseError=="undefined"?nil:ParseError)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st($ParseError())._new())._messageText_(_st(_st(_st(_st("Parse error on line ".__comma(_st(anException)._basicAt_("line"))).__comma(" column ")).__comma(_st(anException)._basicAt_("column"))).__comma(" : Unexpected character ")).__comma(_st(anException)._basicAt_("found")));
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"parseError:parsing:",{anException:anException,aString:aString},smalltalk.Smalltalk)})},
+messageSends: ["messageText:", ",", "basicAt:", "new"]}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "pseudoVariableNames",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=["self", "super", "nil", "true", "false", "thisContext"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"pseudoVariableNames",{},smalltalk.Smalltalk)})},
+messageSends: []}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "readJSObject:",
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self.readJSObject(anObject);
+return self}, function($ctx1) {$ctx1.fill(self,"readJSObject:",{anObject:anObject},smalltalk.Smalltalk)})},
+messageSends: []}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "removeClass:",
+fn: function (aClass){
+var self=this;
+function $ClassRemoved(){return smalltalk.ClassRemoved||(typeof ClassRemoved=="undefined"?nil:ClassRemoved)}
+function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2,$3;
+$1=_st(aClass)._isMetaclass();
+if(smalltalk.assert($1)){
+self._error_(_st(_st(aClass)._asString()).__comma(" is a Metaclass and cannot be removed!"));
+};
+self._deleteClass_(aClass);
+$2=_st($ClassRemoved())._new();
+_st($2)._theClass_(aClass);
+$3=_st($2)._yourself();
+_st(_st($SystemAnnouncer())._current())._announce_($3);
+return self}, function($ctx1) {$ctx1.fill(self,"removeClass:",{aClass:aClass},smalltalk.Smalltalk)})},
+messageSends: ["ifTrue:", "error:", ",", "asString", "isMetaclass", "deleteClass:", "announce:", "theClass:", "new", "yourself", "current"]}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "removePackage:",
+fn: function (packageName){
+var self=this;
+var pkg;
+return smalltalk.withContext(function($ctx1) { 
+pkg=self._packageAt_ifAbsent_(packageName,(function(){
+return smalltalk.withContext(function($ctx2) {
+return self._error_("Missing package: ".__comma(packageName));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+_st(_st(pkg)._classes())._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return self._removeClass_(each);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+self._deletePackage_(packageName);
+return self}, function($ctx1) {$ctx1.fill(self,"removePackage:",{packageName:packageName,pkg:pkg},smalltalk.Smalltalk)})},
+messageSends: ["packageAt:ifAbsent:", "error:", ",", "do:", "removeClass:", "classes", "deletePackage:"]}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renamePackage:to:",
+fn: function (packageName,newName){
+var self=this;
+var pkg;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+pkg=self._packageAt_ifAbsent_(packageName,(function(){
+return smalltalk.withContext(function($ctx2) {
+return self._error_("Missing package: ".__comma(packageName));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+$1=self._packageAt_(newName);
+if(($receiver = $1) == nil || $receiver == undefined){
+$1;
+} else {
+self._error_("Already exists a package called: ".__comma(newName));
+};
+_st(self._basicAt_("packages"))._at_put_(newName,pkg);
+_st(pkg)._name_(newName);
+self._deletePackage_(packageName);
+return self}, function($ctx1) {$ctx1.fill(self,"renamePackage:to:",{packageName:packageName,newName:newName,pkg:pkg},smalltalk.Smalltalk)})},
+messageSends: ["packageAt:ifAbsent:", "error:", ",", "ifNotNil:", "packageAt:", "at:put:", "basicAt:", "name:", "deletePackage:"]}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "reservedWords",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self.reservedWords;
+return self}, function($ctx1) {$ctx1.fill(self,"reservedWords",{},smalltalk.Smalltalk)})},
+messageSends: []}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "version",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "0.11.0";
+}, function($ctx1) {$ctx1.fill(self,"version",{},smalltalk.Smalltalk)})},
+messageSends: []}),
+smalltalk.Smalltalk);
+
+
+smalltalk.Smalltalk.klass.iVarNames = ['current'];
+smalltalk.addMethod(
+smalltalk.method({
+selector: "current",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return smalltalk;
+return self}, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.Smalltalk.klass)})},
+messageSends: []}),
+smalltalk.Smalltalk.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "asJavaScriptSelector",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=self._replace_with_("^([a-zA-Z0-9]*).*$","$1");
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"asJavaScriptSelector",{},smalltalk.String)})},
+messageSends: ["replace:with:"]}),
+smalltalk.String);
+
+})(global_smalltalk,global_nil,global__st);

+ 2307 - 0
js/Kernel-Infrastructure.js

@@ -0,0 +1,2307 @@
+(function(smalltalk,nil,_st){
+smalltalk.addPackage('Kernel-Infrastructure');
+
+smalltalk.addClass('InspectorHandler', smalltalk.Object, [], 'Kernel-Infrastructure');
+smalltalk.InspectorHandler.comment="I am responsible for inspecting object.\x0a\x0aMy class-side `inspector` inst var holds the current inspector I'm delegating object inspection to.\x0a\x0aThe default inspector object is the transcript.";
+
+smalltalk.InspectorHandler.klass.iVarNames = ['inspector'];
+smalltalk.addMethod(
+smalltalk.method({
+selector: "inspect:",
+category: 'registration',
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(self._inspector())._inspect_(anObject);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.InspectorHandler.klass)})},
+args: ["anObject"],
+source: "inspect: anObject\x0a\x09^ self inspector inspect: anObject",
+messageSends: ["inspect:", "inspector"],
+referencedClasses: []
+}),
+smalltalk.InspectorHandler.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "inspector",
+category: 'accessing',
+fn: function (){
+var self=this;
+function $Transcript(){return smalltalk.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@inspector"];
+if(($receiver = $2) == nil || $receiver == undefined){
+self["@inspector"]=$Transcript();
+$1=self["@inspector"];
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"inspector",{},smalltalk.InspectorHandler.klass)})},
+args: [],
+source: "inspector\x0a\x09^ inspector ifNil: [ inspector := Transcript ]",
+messageSends: ["ifNil:"],
+referencedClasses: ["Transcript"]
+}),
+smalltalk.InspectorHandler.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "register:",
+category: 'registration',
+fn: function (anInspector){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self["@inspector"]=anInspector;
+return self}, function($ctx1) {$ctx1.fill(self,"register:",{anInspector:anInspector},smalltalk.InspectorHandler.klass)})},
+args: ["anInspector"],
+source: "register: anInspector\x0a\x09inspector := anInspector",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.InspectorHandler.klass);
+
+
+smalltalk.addClass('InterfacingObject', smalltalk.Object, [], 'Kernel-Infrastructure');
+smalltalk.InterfacingObject.comment="I am superclass of all object that interface with user or environment. `Widget` and a few other classes are subclasses of me. I delegate all of the above APIs to `PlatformInterface`.\x0a\x0a## API\x0a\x0a    self alert: 'Hey, there is a problem'.\x0a    self confirm: 'Affirmative?'.\x0a    self prompt: 'Your name:'.\x0a\x0a    self ajax: #{\x0a        'url' -> '/patch.js'. 'type' -> 'GET'. dataType->'script'\x0a    }.\x0a";
+smalltalk.addMethod(
+smalltalk.method({
+selector: "ajax:",
+category: 'actions',
+fn: function (anObject){
+var self=this;
+function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st($PlatformInterface())._ajax_(anObject);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"ajax:",{anObject:anObject},smalltalk.InterfacingObject)})},
+args: ["anObject"],
+source: "ajax: anObject\x0a\x09^PlatformInterface ajax: anObject",
+messageSends: ["ajax:"],
+referencedClasses: ["PlatformInterface"]
+}),
+smalltalk.InterfacingObject);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "alert:",
+category: 'actions',
+fn: function (aString){
+var self=this;
+function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st($PlatformInterface())._alert_(aString);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},smalltalk.InterfacingObject)})},
+args: ["aString"],
+source: "alert: aString\x0a\x09^PlatformInterface alert: aString",
+messageSends: ["alert:"],
+referencedClasses: ["PlatformInterface"]
+}),
+smalltalk.InterfacingObject);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "confirm:",
+category: 'actions',
+fn: function (aString){
+var self=this;
+function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st($PlatformInterface())._confirm_(aString);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"confirm:",{aString:aString},smalltalk.InterfacingObject)})},
+args: ["aString"],
+source: "confirm: aString\x0a\x09^PlatformInterface confirm: aString",
+messageSends: ["confirm:"],
+referencedClasses: ["PlatformInterface"]
+}),
+smalltalk.InterfacingObject);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "prompt:",
+category: 'actions',
+fn: function (aString){
+var self=this;
+function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st($PlatformInterface())._prompt_(aString);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"prompt:",{aString:aString},smalltalk.InterfacingObject)})},
+args: ["aString"],
+source: "prompt: aString\x0a\x09^PlatformInterface prompt: aString",
+messageSends: ["prompt:"],
+referencedClasses: ["PlatformInterface"]
+}),
+smalltalk.InterfacingObject);
+
+
+
+smalltalk.addClass('Environment', smalltalk.InterfacingObject, [], 'Kernel-Infrastructure');
+smalltalk.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.";
+smalltalk.addMethod(
+smalltalk.method({
+selector: "addInstVarNamed:to:",
+category: 'compiling',
+fn: function (aString,aClass){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+$1=_st(_st(aClass)._instanceVariableNames())._copy();
+_st($1)._add_(aString);
+$2=_st($1)._yourself();
+_st(self._classBuilder())._addSubclassOf_named_instanceVariableNames_package_(_st(aClass)._superclass(),_st(aClass)._name(),$2,_st(_st(aClass)._package())._name());
+return self}, function($ctx1) {$ctx1.fill(self,"addInstVarNamed:to:",{aString:aString,aClass:aClass},smalltalk.Environment)})},
+args: ["aString", "aClass"],
+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",
+messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "superclass", "name", "add:", "copy", "instanceVariableNames", "yourself", "package", "classBuilder"],
+referencedClasses: []
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "allSelectors",
+category: 'accessing',
+fn: function (){
+var self=this;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(_st($Smalltalk())._current())._at_("allSelectors"))._value();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"allSelectors",{},smalltalk.Environment)})},
+args: [],
+source: "allSelectors\x0a\x09^ (Smalltalk current at: 'allSelectors') value",
+messageSends: ["value", "at:", "current"],
+referencedClasses: ["Smalltalk"]
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "availableClassNames",
+category: 'accessing',
+fn: function (){
+var self=this;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(_st($Smalltalk())._current())._classes())._collect_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(each)._name();
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"availableClassNames",{},smalltalk.Environment)})},
+args: [],
+source: "availableClassNames\x0a\x09^ Smalltalk current classes \x0a\x09\x09collect: [ :each | each name ]",
+messageSends: ["collect:", "name", "classes", "current"],
+referencedClasses: ["Smalltalk"]
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "availablePackageNames",
+category: 'accessing',
+fn: function (){
+var self=this;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(_st($Smalltalk())._current())._packages())._collect_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(each)._name();
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"availablePackageNames",{},smalltalk.Environment)})},
+args: [],
+source: "availablePackageNames\x0a\x09^ Smalltalk current packages \x0a\x09\x09collect: [ :each | each name ]",
+messageSends: ["collect:", "name", "packages", "current"],
+referencedClasses: ["Smalltalk"]
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "availableProtocolsFor:",
+category: 'accessing',
+fn: function (aClass){
+var self=this;
+var protocols;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+protocols=_st(aClass)._protocols();
+$1=_st(aClass)._superclass();
+if(($receiver = $1) == nil || $receiver == undefined){
+$1;
+} else {
+_st(protocols)._addAll_(self._availableProtocolsFor_(_st(aClass)._superclass()));
+};
+$2=_st(_st(protocols)._asSet())._asArray();
+return $2;
+}, function($ctx1) {$ctx1.fill(self,"availableProtocolsFor:",{aClass:aClass,protocols:protocols},smalltalk.Environment)})},
+args: ["aClass"],
+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",
+messageSends: ["protocols", "ifNotNil:", "addAll:", "availableProtocolsFor:", "superclass", "asArray", "asSet"],
+referencedClasses: []
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "classBuilder",
+category: 'accessing',
+fn: function (){
+var self=this;
+function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st($ClassBuilder())._new();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"classBuilder",{},smalltalk.Environment)})},
+args: [],
+source: "classBuilder\x0a\x09^ ClassBuilder new",
+messageSends: ["new"],
+referencedClasses: ["ClassBuilder"]
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "classNamed:",
+category: 'accessing',
+fn: function (aString){
+var self=this;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=_st(_st($Smalltalk())._current())._at_(_st(aString)._asSymbol());
+if(($receiver = $2) == nil || $receiver == undefined){
+$1=self._error_("Invalid class name");
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"classNamed:",{aString:aString},smalltalk.Environment)})},
+args: ["aString"],
+source: "classNamed: aString\x0a\x09^ (Smalltalk current at: aString asSymbol)\x0a\x09\x09ifNil: [ self error: 'Invalid class name' ]",
+messageSends: ["ifNil:", "error:", "at:", "asSymbol", "current"],
+referencedClasses: ["Smalltalk"]
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "classes",
+category: 'accessing',
+fn: function (){
+var self=this;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st($Smalltalk())._current())._classes();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Environment)})},
+args: [],
+source: "classes\x0a\x09^ Smalltalk current classes",
+messageSends: ["classes", "current"],
+referencedClasses: ["Smalltalk"]
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "commitPackage:",
+category: 'actions',
+fn: function (aPackage){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(aPackage)._commit();
+return self}, function($ctx1) {$ctx1.fill(self,"commitPackage:",{aPackage:aPackage},smalltalk.Environment)})},
+args: ["aPackage"],
+source: "commitPackage: aPackage\x0a\x09aPackage commit",
+messageSends: ["commit"],
+referencedClasses: []
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "compileClassComment:for:",
+category: 'compiling',
+fn: function (aString,aClass){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(aClass)._comment_(aString);
+return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment:for:",{aString:aString,aClass:aClass},smalltalk.Environment)})},
+args: ["aString", "aClass"],
+source: "compileClassComment: aString for: aClass\x0a\x09aClass comment: aString",
+messageSends: ["comment:"],
+referencedClasses: []
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "compileClassDefinition:",
+category: 'compiling',
+fn: function (aString){
+var self=this;
+function $DoIt(){return smalltalk.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
+return smalltalk.withContext(function($ctx1) { 
+self._eval_on_(aString,_st($DoIt())._new());
+return self}, function($ctx1) {$ctx1.fill(self,"compileClassDefinition:",{aString:aString},smalltalk.Environment)})},
+args: ["aString"],
+source: "compileClassDefinition: aString\x0a\x09self eval: aString on: DoIt new",
+messageSends: ["eval:on:", "new"],
+referencedClasses: ["DoIt"]
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "compileMethod:for:protocol:",
+category: 'compiling',
+fn: function (sourceCode,class_,protocol){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(class_)._compile_category_(sourceCode,protocol);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"compileMethod:for:protocol:",{sourceCode:sourceCode,class_:class_,protocol:protocol},smalltalk.Environment)})},
+args: ["sourceCode", "class", "protocol"],
+source: "compileMethod: sourceCode for: class protocol: protocol\x0a\x09^ class\x0a\x09\x09compile: sourceCode\x0a\x09\x09category: protocol",
+messageSends: ["compile:category:"],
+referencedClasses: []
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "copyClass:to:",
+category: 'actions',
+fn: function (aClass,aClassName){
+var self=this;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st($Smalltalk())._current())._at_(aClassName);
+if(($receiver = $1) == nil || $receiver == undefined){
+$1;
+} else {
+self._error_(_st("A class named ".__comma(aClassName)).__comma(" already exists"));
+};
+_st(_st($ClassBuilder())._new())._copyClass_named_(aClass,aClassName);
+return self}, function($ctx1) {$ctx1.fill(self,"copyClass:to:",{aClass:aClass,aClassName:aClassName},smalltalk.Environment)})},
+args: ["aClass", "aClassName"],
+source: "copyClass: aClass to: aClassName\x0a\x09(Smalltalk current at: aClassName)\x0a\x09\x09ifNotNil: [ self error: 'A class named ', aClassName, ' already exists' ].\x0a\x09\x09\x0a\x09ClassBuilder new copyClass: aClass named: aClassName",
+messageSends: ["ifNotNil:", "error:", ",", "at:", "current", "copyClass:named:", "new"],
+referencedClasses: ["Smalltalk", "ClassBuilder"]
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "eval:on:",
+category: 'actions',
+fn: function (aString,aReceiver){
+var self=this;
+var compiler;
+function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
+function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+var $early={};
+try {
+compiler=_st($Compiler())._new();
+_st((function(){
+return smalltalk.withContext(function($ctx2) {
+return _st(compiler)._parseExpression_(aString);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_($Error(),(function(ex){
+return smalltalk.withContext(function($ctx2) {
+$1=self._alert_(_st(ex)._messageText());
+throw $early=[$1];
+}, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
+$2=_st(compiler)._evaluateExpression_on_(aString,aReceiver);
+return $2;
+}
+catch(e) {if(e===$early)return e[0]; throw e}
+}, function($ctx1) {$ctx1.fill(self,"eval:on:",{aString:aString,aReceiver:aReceiver,compiler:compiler},smalltalk.Environment)})},
+args: ["aString", "aReceiver"],
+source: "eval: aString on: aReceiver\x0a\x09| compiler |\x0a\x09compiler := Compiler new.\x0a\x09[ compiler parseExpression: aString ] on: Error do: [ :ex |\x0a\x09\x09^ self alert: ex messageText ].\x0a\x09^ compiler evaluateExpression: aString on: aReceiver",
+messageSends: ["new", "on:do:", "alert:", "messageText", "parseExpression:", "evaluateExpression:on:"],
+referencedClasses: ["Compiler", "Error"]
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "evaluate:on:do:",
+category: 'error handling',
+fn: function (aBlock,anErrorClass,exceptionBlock){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+self._try_catch_(aBlock,(function(exception){
+return smalltalk.withContext(function($ctx2) {
+$1=_st(exception)._isKindOf_(self._classNamed_(_st(anErrorClass)._name()));
+if(smalltalk.assert($1)){
+return _st(exceptionBlock)._value_(exception);
+} else {
+return _st(exception)._signal();
+};
+}, function($ctx2) {$ctx2.fillBlock({exception:exception},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"evaluate:on:do:",{aBlock:aBlock,anErrorClass:anErrorClass,exceptionBlock:exceptionBlock},smalltalk.Environment)})},
+args: ["aBlock", "anErrorClass", "exceptionBlock"],
+source: "evaluate: aBlock on: anErrorClass do: exceptionBlock\x0a\x09\x22Evaluate a block and catch exceptions happening on the environment stack\x22\x0a\x09\x0a\x09self try: aBlock catch: [ :exception | \x0a\x09\x09(exception isKindOf: (self classNamed: anErrorClass name))\x0a\x09\x09\x09ifTrue: [ exceptionBlock value: exception ]\x0a \x09\x09\x09ifFalse: [ exception signal ] ]",
+messageSends: ["try:catch:", "ifTrue:ifFalse:", "value:", "signal", "isKindOf:", "classNamed:", "name"],
+referencedClasses: []
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "inspect:",
+category: 'actions',
+fn: function (anObject){
+var self=this;
+function $InspectorHandler(){return smalltalk.InspectorHandler||(typeof InspectorHandler=="undefined"?nil:InspectorHandler)}
+return smalltalk.withContext(function($ctx1) { 
+_st(_st($InspectorHandler())._inspector())._inspect_(anObject);
+return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.Environment)})},
+args: ["anObject"],
+source: "inspect: anObject\x0a\x09InspectorHandler inspector inspect: anObject",
+messageSends: ["inspect:", "inspector"],
+referencedClasses: ["InspectorHandler"]
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "moveClass:toPackage:",
+category: 'actions',
+fn: function (aClass,aPackageName){
+var self=this;
+var package_;
+function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2,$3;
+package_=_st($Package())._named_(aPackageName);
+$1=package_;
+if(($receiver = $1) == nil || $receiver == undefined){
+self._error_("Invalid package name");
+} else {
+$1;
+};
+$2=_st(package_).__eq_eq(_st(aClass)._package());
+if(smalltalk.assert($2)){
+$3=self;
+return $3;
+};
+_st(aClass)._package_(package_);
+return self}, function($ctx1) {$ctx1.fill(self,"moveClass:toPackage:",{aClass:aClass,aPackageName:aPackageName,package_:package_},smalltalk.Environment)})},
+args: ["aClass", "aPackageName"],
+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",
+messageSends: ["named:", "ifNil:", "error:", "ifTrue:", "==", "package", "package:"],
+referencedClasses: ["Package"]
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "moveMethod:toClass:",
+category: 'actions',
+fn: function (aMethod,aClassName){
+var self=this;
+var destinationClass;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2,$3;
+destinationClass=_st(_st($Smalltalk())._current())._at_(_st(aClassName)._asSymbol());
+$1=destinationClass;
+if(($receiver = $1) == nil || $receiver == undefined){
+self._error_("Invalid class name");
+} else {
+$1;
+};
+$2=_st(destinationClass).__eq_eq(_st(aMethod)._methodClass());
+if(smalltalk.assert($2)){
+$3=self;
+return $3;
+};
+_st(destinationClass)._compile_category_(_st(aMethod)._source(),_st(aMethod)._protocol());
+_st(_st(aMethod)._methodClass())._removeCompiledMethod_(aMethod);
+return self}, function($ctx1) {$ctx1.fill(self,"moveMethod:toClass:",{aMethod:aMethod,aClassName:aClassName,destinationClass:destinationClass},smalltalk.Environment)})},
+args: ["aMethod", "aClassName"],
+source: "moveMethod: aMethod toClass: aClassName\x0a\x09| destinationClass |\x0a\x09\x0a\x09destinationClass := Smalltalk current at: aClassName asSymbol.\x0a\x09destinationClass ifNil: [ self error: 'Invalid class name' ].\x0a\x09destinationClass == aMethod methodClass ifTrue: [ ^ self ].\x0a\x09\x0a\x09destinationClass \x0a\x09\x09compile: aMethod source\x0a\x09\x09category: aMethod protocol.\x0a\x09aMethod methodClass \x0a\x09\x09removeCompiledMethod: aMethod",
+messageSends: ["at:", "asSymbol", "current", "ifNil:", "error:", "ifTrue:", "==", "methodClass", "compile:category:", "source", "protocol", "removeCompiledMethod:"],
+referencedClasses: ["Smalltalk"]
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "moveMethod:toProtocol:",
+category: 'actions',
+fn: function (aMethod,aProtocol){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(aMethod)._category_(aProtocol);
+return self}, function($ctx1) {$ctx1.fill(self,"moveMethod:toProtocol:",{aMethod:aMethod,aProtocol:aProtocol},smalltalk.Environment)})},
+args: ["aMethod", "aProtocol"],
+source: "moveMethod: aMethod toProtocol: aProtocol\x0a\x09aMethod category: aProtocol",
+messageSends: ["category:"],
+referencedClasses: []
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "packages",
+category: 'accessing',
+fn: function (){
+var self=this;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st($Smalltalk())._current())._packages();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"packages",{},smalltalk.Environment)})},
+args: [],
+source: "packages\x0a\x09^ Smalltalk current packages",
+messageSends: ["packages", "current"],
+referencedClasses: ["Smalltalk"]
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "registerErrorHandler:",
+category: 'actions',
+fn: function (anErrorHandler){
+var self=this;
+function $ErrorHandler(){return smalltalk.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
+return smalltalk.withContext(function($ctx1) { 
+_st($ErrorHandler())._setCurrent_(anErrorHandler);
+return self}, function($ctx1) {$ctx1.fill(self,"registerErrorHandler:",{anErrorHandler:anErrorHandler},smalltalk.Environment)})},
+args: ["anErrorHandler"],
+source: "registerErrorHandler: anErrorHandler\x0a\x09ErrorHandler setCurrent: anErrorHandler",
+messageSends: ["setCurrent:"],
+referencedClasses: ["ErrorHandler"]
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "registerInspector:",
+category: 'actions',
+fn: function (anInspector){
+var self=this;
+function $InspectorHandler(){return smalltalk.InspectorHandler||(typeof InspectorHandler=="undefined"?nil:InspectorHandler)}
+return smalltalk.withContext(function($ctx1) { 
+_st($InspectorHandler())._register_(anInspector);
+return self}, function($ctx1) {$ctx1.fill(self,"registerInspector:",{anInspector:anInspector},smalltalk.Environment)})},
+args: ["anInspector"],
+source: "registerInspector: anInspector\x0a\x09InspectorHandler register: anInspector",
+messageSends: ["register:"],
+referencedClasses: ["InspectorHandler"]
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "registerProgressHandler:",
+category: 'actions',
+fn: function (aProgressHandler){
+var self=this;
+function $ProgressHandler(){return smalltalk.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
+return smalltalk.withContext(function($ctx1) { 
+_st($ProgressHandler())._setCurrent_(aProgressHandler);
+return self}, function($ctx1) {$ctx1.fill(self,"registerProgressHandler:",{aProgressHandler:aProgressHandler},smalltalk.Environment)})},
+args: ["aProgressHandler"],
+source: "registerProgressHandler: aProgressHandler\x0a\x09ProgressHandler setCurrent: aProgressHandler",
+messageSends: ["setCurrent:"],
+referencedClasses: ["ProgressHandler"]
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "removeClass:",
+category: 'actions',
+fn: function (aClass){
+var self=this;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+return smalltalk.withContext(function($ctx1) { 
+_st(_st($Smalltalk())._current())._removeClass_(aClass);
+return self}, function($ctx1) {$ctx1.fill(self,"removeClass:",{aClass:aClass},smalltalk.Environment)})},
+args: ["aClass"],
+source: "removeClass: aClass\x0a\x09Smalltalk current removeClass: aClass",
+messageSends: ["removeClass:", "current"],
+referencedClasses: ["Smalltalk"]
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "removeMethod:",
+category: 'actions',
+fn: function (aMethod){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(aMethod)._methodClass())._removeCompiledMethod_(aMethod);
+return self}, function($ctx1) {$ctx1.fill(self,"removeMethod:",{aMethod:aMethod},smalltalk.Environment)})},
+args: ["aMethod"],
+source: "removeMethod: aMethod\x0a\x09aMethod methodClass removeCompiledMethod: aMethod",
+messageSends: ["removeCompiledMethod:", "methodClass"],
+referencedClasses: []
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "removeProtocol:from:",
+category: 'actions',
+fn: function (aString,aClass){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(_st(aClass)._methods())._select_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(_st(each)._protocol()).__eq(aString);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(aClass)._removeCompiledMethod_(each);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"removeProtocol:from:",{aString:aString,aClass:aClass},smalltalk.Environment)})},
+args: ["aString", "aClass"],
+source: "removeProtocol: aString from: aClass\x0a\x09(aClass methods\x0a\x09\x09select: [ :each | each protocol = aString ])\x0a\x09\x09do: [ :each | aClass removeCompiledMethod: each ]",
+messageSends: ["do:", "removeCompiledMethod:", "select:", "=", "protocol", "methods"],
+referencedClasses: []
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renameClass:to:",
+category: 'actions',
+fn: function (aClass,aClassName){
+var self=this;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st($Smalltalk())._current())._at_(aClassName);
+if(($receiver = $1) == nil || $receiver == undefined){
+$1;
+} else {
+self._error_(_st("A class named ".__comma(aClassName)).__comma(" already exists"));
+};
+_st(_st($ClassBuilder())._new())._renameClass_to_(aClass,aClassName);
+return self}, function($ctx1) {$ctx1.fill(self,"renameClass:to:",{aClass:aClass,aClassName:aClassName},smalltalk.Environment)})},
+args: ["aClass", "aClassName"],
+source: "renameClass: aClass to: aClassName\x0a\x09(Smalltalk current at: aClassName)\x0a\x09\x09ifNotNil: [ self error: 'A class named ', aClassName, ' already exists' ].\x0a\x09\x09\x0a\x09ClassBuilder new renameClass: aClass to: aClassName",
+messageSends: ["ifNotNil:", "error:", ",", "at:", "current", "renameClass:to:", "new"],
+referencedClasses: ["Smalltalk", "ClassBuilder"]
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renameProtocol:to:in:",
+category: 'actions',
+fn: function (aString,anotherString,aClass){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(_st(aClass)._methods())._select_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(_st(each)._protocol()).__eq(aString);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(each)._protocol_(anotherString);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"renameProtocol:to:in:",{aString:aString,anotherString:anotherString,aClass:aClass},smalltalk.Environment)})},
+args: ["aString", "anotherString", "aClass"],
+source: "renameProtocol: aString to: anotherString in: aClass\x0a\x09(aClass methods\x0a\x09\x09select: [ :each | each protocol = aString ])\x0a\x09\x09do: [ :each | each protocol: anotherString ]",
+messageSends: ["do:", "protocol:", "select:", "=", "protocol", "methods"],
+referencedClasses: []
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "setClassCommentOf:to:",
+category: 'actions',
+fn: function (aClass,aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(aClass)._comment_(aString);
+return self}, function($ctx1) {$ctx1.fill(self,"setClassCommentOf:to:",{aClass:aClass,aString:aString},smalltalk.Environment)})},
+args: ["aClass", "aString"],
+source: "setClassCommentOf: aClass to: aString\x0a\x09aClass comment: aString",
+messageSends: ["comment:"],
+referencedClasses: []
+}),
+smalltalk.Environment);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "systemAnnouncer",
+category: 'accessing',
+fn: function (){
+var self=this;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(_st($Smalltalk())._current())._at_("SystemAnnouncer"))._current();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"systemAnnouncer",{},smalltalk.Environment)})},
+args: [],
+source: "systemAnnouncer\x0a\x09^ (Smalltalk current at: #SystemAnnouncer) current",
+messageSends: ["current", "at:"],
+referencedClasses: ["Smalltalk"]
+}),
+smalltalk.Environment);
+
+
+
+smalltalk.addClass('JSObjectProxy', smalltalk.Object, ['jsObject'], 'Kernel-Infrastructure');
+smalltalk.JSObjectProxy.comment="I handle sending messages to JavaScript objects, making  JavaScript object accessing from Amber fully transparent.\x0aMy instances make intensive use of `#doesNotUnderstand:`.\x0a\x0aMy instances are automatically created by Amber whenever a message is sent to a JavaScript object.\x0a\x0a## Usage examples\x0a\x0aJSObjectProxy objects are instanciated by Amber when a Smalltalk message is sent to a JavaScript object.\x0a\x0a\x09window alert: 'hello world'.\x0a\x09window inspect.\x0a\x09(window jQuery: 'body') append: 'hello world'\x0a\x0aAmber messages sends are converted to JavaScript function calls or object property access _(in this order)_. If n one of them match, a `MessageNotUnderstood` error will be thrown.\x0a\x0a## Message conversion rules\x0a\x0a- `someUser name` becomes `someUser.name`\x0a- `someUser name: 'John'` becomes `someUser name = \x22John\x22`\x0a- `console log: 'hello world'` becomes `console.log('hello world')`\x0a- `(window jQuery: 'foo') css: 'background' color: 'red'` becomes `window.jQuery('foo').css('background', 'red')`\x0a\x0a__Note:__ For keyword-based messages, only the first keyword is kept: `window foo: 1 bar: 2` is equivalent to `window foo: 1 baz: 2`.";
+smalltalk.addMethod(
+smalltalk.method({
+selector: "addObjectVariablesTo:",
+category: 'proxy',
+fn: function (aDictionary){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+
+		for(var i in self['@jsObject']) {
+			aDictionary._at_put_(i, self['@jsObject'][i]);
+		}
+	;
+return self}, function($ctx1) {$ctx1.fill(self,"addObjectVariablesTo:",{aDictionary:aDictionary},smalltalk.JSObjectProxy)})},
+args: ["aDictionary"],
+source: "addObjectVariablesTo: aDictionary\x0a\x09<\x0a\x09\x09for(var i in self['@jsObject']) {\x0a\x09\x09\x09aDictionary._at_put_(i, self['@jsObject'][i]);\x0a\x09\x09}\x0a\x09>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "at:",
+category: 'accessing',
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self['@jsObject'][aString];
+return self}, function($ctx1) {$ctx1.fill(self,"at:",{aString:aString},smalltalk.JSObjectProxy)})},
+args: ["aString"],
+source: "at: aString\x0a\x09<return self['@jsObject'][aString]>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "at:ifAbsent:",
+category: 'accessing',
+fn: function (aString,aBlock){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+
+		var obj = self['@jsObject'];
+		return aString in obj ? obj[aString] : aBlock._value();
+	;
+return self}, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{aString:aString,aBlock:aBlock},smalltalk.JSObjectProxy)})},
+args: ["aString", "aBlock"],
+source: "at: aString ifAbsent: aBlock\x0a\x09\x22return the aString property or evaluate aBlock if the property is not defined on the object\x22\x0a\x09<\x0a\x09\x09var obj = self['@jsObject'];\x0a\x09\x09return aString in obj ? obj[aString] : aBlock._value();\x0a\x09>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "at:ifPresent:",
+category: 'accessing',
+fn: function (aString,aBlock){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+
+		var obj = self['@jsObject'];
+		return aString in obj ? aBlock._value_(obj[aString]) : nil;
+	;
+return self}, function($ctx1) {$ctx1.fill(self,"at:ifPresent:",{aString:aString,aBlock:aBlock},smalltalk.JSObjectProxy)})},
+args: ["aString", "aBlock"],
+source: "at: aString ifPresent: aBlock\x0a\x09\x22return the evaluation of aBlock with the value if the property is defined or return nil\x22\x0a\x09<\x0a\x09\x09var obj = self['@jsObject'];\x0a\x09\x09return aString in obj ? aBlock._value_(obj[aString]) : nil;\x0a\x09>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "at:ifPresent:ifAbsent:",
+category: 'accessing',
+fn: function (aString,aBlock,anotherBlock){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+
+		var obj = self['@jsObject'];
+		return aString in obj ? aBlock._value_(obj[aString]) : anotherBlock._value();
+	;
+return self}, function($ctx1) {$ctx1.fill(self,"at:ifPresent:ifAbsent:",{aString:aString,aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.JSObjectProxy)})},
+args: ["aString", "aBlock", "anotherBlock"],
+source: "at: aString ifPresent: aBlock ifAbsent: anotherBlock\x0a\x09\x22return the evaluation of aBlock with the value if the property is defined\x0a\x09or return value of anotherBlock\x22\x0a\x09<\x0a\x09\x09var obj = self['@jsObject'];\x0a\x09\x09return aString in obj ? aBlock._value_(obj[aString]) : anotherBlock._value();\x0a\x09>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "at:put:",
+category: 'accessing',
+fn: function (aString,anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self['@jsObject'][aString] = anObject;
+return self}, function($ctx1) {$ctx1.fill(self,"at:put:",{aString:aString,anObject:anObject},smalltalk.JSObjectProxy)})},
+args: ["aString", "anObject"],
+source: "at: aString put: anObject\x0a\x09<self['@jsObject'][aString] = anObject>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "doesNotUnderstand:",
+category: 'proxy',
+fn: function (aMessage){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self._lookupProperty_(_st(_st(aMessage)._selector())._asJavaScriptSelector());
+if(($receiver = $2) == nil || $receiver == undefined){
+$1=smalltalk.JSObjectProxy.superclass.fn.prototype._doesNotUnderstand_.apply(_st(self), [aMessage]);
+} else {
+var jsSelector;
+jsSelector=$receiver;
+$1=self._forwardMessage_withArguments_(jsSelector,_st(aMessage)._arguments());
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"doesNotUnderstand:",{aMessage:aMessage},smalltalk.JSObjectProxy)})},
+args: ["aMessage"],
+source: "doesNotUnderstand: aMessage\x0a\x09^ (self lookupProperty: aMessage selector asJavaScriptSelector)\x0a\x09\x09ifNil: [ super doesNotUnderstand: aMessage ]\x0a\x09\x09ifNotNil: [ :jsSelector | \x0a\x09\x09\x09self \x0a\x09\x09\x09\x09forwardMessage: jsSelector \x0a\x09\x09\x09\x09withArguments: aMessage arguments ]",
+messageSends: ["ifNil:ifNotNil:", "doesNotUnderstand:", "forwardMessage:withArguments:", "arguments", "lookupProperty:", "asJavaScriptSelector", "selector"],
+referencedClasses: []
+}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "forwardMessage:withArguments:",
+category: 'proxy',
+fn: function (aString,anArray){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+
+		return smalltalk.send(self._jsObject(), aString, anArray);
+	;
+return self}, function($ctx1) {$ctx1.fill(self,"forwardMessage:withArguments:",{aString:aString,anArray:anArray},smalltalk.JSObjectProxy)})},
+args: ["aString", "anArray"],
+source: "forwardMessage: aString withArguments: anArray\x0a\x09<\x0a\x09\x09return smalltalk.send(self._jsObject(), aString, anArray);\x0a\x09>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "inspectOn:",
+category: 'proxy',
+fn: function (anInspector){
+var self=this;
+var variables;
+function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
+return smalltalk.withContext(function($ctx1) { 
+variables=_st($Dictionary())._new();
+_st(variables)._at_put_("#self",self._jsObject());
+_st(anInspector)._setLabel_(self._printString());
+self._addObjectVariablesTo_(variables);
+_st(anInspector)._setVariables_(variables);
+return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.JSObjectProxy)})},
+args: ["anInspector"],
+source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self jsObject.\x0a\x09anInspector setLabel: self printString.\x0a\x09self addObjectVariablesTo: variables.\x0a\x09anInspector setVariables: variables",
+messageSends: ["new", "at:put:", "jsObject", "setLabel:", "printString", "addObjectVariablesTo:", "setVariables:"],
+referencedClasses: ["Dictionary"]
+}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "jsObject",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=self["@jsObject"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"jsObject",{},smalltalk.JSObjectProxy)})},
+args: [],
+source: "jsObject\x0a\x09^jsObject",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "jsObject:",
+category: 'accessing',
+fn: function (aJSObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self["@jsObject"]=aJSObject;
+return self}, function($ctx1) {$ctx1.fill(self,"jsObject:",{aJSObject:aJSObject},smalltalk.JSObjectProxy)})},
+args: ["aJSObject"],
+source: "jsObject: aJSObject\x0a\x09jsObject := aJSObject",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "keysAndValuesDo:",
+category: 'enumerating',
+fn: function (aBlock){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+
+		var o = self['@jsObject'];
+		for(var i in o) {
+			aBlock._value_value_(i, o[i]);
+		}
+	;
+return self}, function($ctx1) {$ctx1.fill(self,"keysAndValuesDo:",{aBlock:aBlock},smalltalk.JSObjectProxy)})},
+args: ["aBlock"],
+source: "keysAndValuesDo: aBlock\x0a\x09<\x0a\x09\x09var o = self['@jsObject'];\x0a\x09\x09for(var i in o) {\x0a\x09\x09\x09aBlock._value_value_(i, o[i]);\x0a\x09\x09}\x0a\x09>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "lookupProperty:",
+category: 'accessing',
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return aString in self._jsObject() ? aString : nil;
+return self}, function($ctx1) {$ctx1.fill(self,"lookupProperty:",{aString:aString},smalltalk.JSObjectProxy)})},
+args: ["aString"],
+source: "lookupProperty: aString\x0a\x09\x22Looks up a property in JS object.\x0a\x09Answer the property if it is present, or nil if it is not present.\x22\x0a\x09\x0a\x09<return aString in self._jsObject() ? aString : nil>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "printOn:",
+category: 'printing',
+fn: function (aStream){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(aStream)._nextPutAll_(_st(self._jsObject())._toString());
+return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.JSObjectProxy)})},
+args: ["aStream"],
+source: "printOn: aStream\x0a\x09aStream nextPutAll: self jsObject toString",
+messageSends: ["nextPutAll:", "toString", "jsObject"],
+referencedClasses: []
+}),
+smalltalk.JSObjectProxy);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "value",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=self._at_ifAbsent_("value",(function(){
+return smalltalk.withContext(function($ctx2) {
+return smalltalk.JSObjectProxy.superclass.fn.prototype._value.apply(_st(self), []);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.JSObjectProxy)})},
+args: [],
+source: "value\x0a\x09\x22if attribute 'value' exists on the JS object return it,\x0a\x09otherwise return the result of Object>>value.\x22\x0a\x09\x0a\x09^ self \x0a\x09\x09at: 'value' \x0a\x09\x09ifAbsent: [ super value ]",
+messageSends: ["at:ifAbsent:", "value"],
+referencedClasses: []
+}),
+smalltalk.JSObjectProxy);
+
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "on:",
+category: 'instance creation',
+fn: function (aJSObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$3,$1;
+$2=self._new();
+_st($2)._jsObject_(aJSObject);
+$3=_st($2)._yourself();
+$1=$3;
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"on:",{aJSObject:aJSObject},smalltalk.JSObjectProxy.klass)})},
+args: ["aJSObject"],
+source: "on: aJSObject\x0a\x09^self new\x0a\x09\x09jsObject: aJSObject;\x0a\x09\x09yourself",
+messageSends: ["jsObject:", "new", "yourself"],
+referencedClasses: []
+}),
+smalltalk.JSObjectProxy.klass);
+
+
+smalltalk.addClass('Organizer', smalltalk.Object, [], 'Kernel-Infrastructure');
+smalltalk.Organizer.comment="I represent categorization information. \x0a\x0a## API\x0a\x0aUse `#addElement:` and `#removeElement:` to manipulate instances.";
+smalltalk.addMethod(
+smalltalk.method({
+selector: "addElement:",
+category: 'accessing',
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self.elements.addElement(anObject);
+return self}, function($ctx1) {$ctx1.fill(self,"addElement:",{anObject:anObject},smalltalk.Organizer)})},
+args: ["anObject"],
+source: "addElement: anObject\x0a\x09<self.elements.addElement(anObject)>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Organizer);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "elements",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(self._basicAt_("elements"))._copy();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"elements",{},smalltalk.Organizer)})},
+args: [],
+source: "elements\x0a\x09^ (self basicAt: 'elements') copy",
+messageSends: ["copy", "basicAt:"],
+referencedClasses: []
+}),
+smalltalk.Organizer);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "removeElement:",
+category: 'accessing',
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self.elements.removeElement(anObject);
+return self}, function($ctx1) {$ctx1.fill(self,"removeElement:",{anObject:anObject},smalltalk.Organizer)})},
+args: ["anObject"],
+source: "removeElement: anObject\x0a\x09<self.elements.removeElement(anObject)>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Organizer);
+
+
+
+smalltalk.addClass('ClassOrganizer', smalltalk.Organizer, [], 'Kernel-Infrastructure');
+smalltalk.ClassOrganizer.comment="I am an organizer specific to classes. I hold method categorization information for classes.";
+smalltalk.addMethod(
+smalltalk.method({
+selector: "addElement:",
+category: 'accessing',
+fn: function (aString){
+var self=this;
+function $ProtocolAdded(){return smalltalk.ProtocolAdded||(typeof ProtocolAdded=="undefined"?nil:ProtocolAdded)}
+function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+smalltalk.ClassOrganizer.superclass.fn.prototype._addElement_.apply(_st(self), [aString]);
+$1=_st($ProtocolAdded())._new();
+_st($1)._protocol_(aString);
+_st($1)._theClass_(self._theClass());
+$2=_st($1)._yourself();
+_st(_st($SystemAnnouncer())._current())._announce_($2);
+return self}, function($ctx1) {$ctx1.fill(self,"addElement:",{aString:aString},smalltalk.ClassOrganizer)})},
+args: ["aString"],
+source: "addElement: aString\x0a\x09super addElement: aString.\x0a\x0a\x09SystemAnnouncer current announce: (ProtocolAdded new\x0a\x09\x09protocol: aString;\x0a\x09\x09theClass: self theClass;\x0a\x09\x09yourself)",
+messageSends: ["addElement:", "announce:", "protocol:", "new", "theClass:", "theClass", "yourself", "current"],
+referencedClasses: ["ProtocolAdded", "SystemAnnouncer"]
+}),
+smalltalk.ClassOrganizer);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "removeElement:",
+category: 'accessing',
+fn: function (aString){
+var self=this;
+function $ProtocolRemoved(){return smalltalk.ProtocolRemoved||(typeof ProtocolRemoved=="undefined"?nil:ProtocolRemoved)}
+function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+smalltalk.ClassOrganizer.superclass.fn.prototype._removeElement_.apply(_st(self), [aString]);
+$1=_st($ProtocolRemoved())._new();
+_st($1)._protocol_(aString);
+_st($1)._theClass_(self._theClass());
+$2=_st($1)._yourself();
+_st(_st($SystemAnnouncer())._current())._announce_($2);
+return self}, function($ctx1) {$ctx1.fill(self,"removeElement:",{aString:aString},smalltalk.ClassOrganizer)})},
+args: ["aString"],
+source: "removeElement: aString\x0a\x09super removeElement: aString.\x0a\x0a\x09SystemAnnouncer current announce: (ProtocolRemoved new\x0a\x09\x09protocol: aString;\x0a\x09\x09theClass: self theClass;\x0a\x09\x09yourself)",
+messageSends: ["removeElement:", "announce:", "protocol:", "new", "theClass:", "theClass", "yourself", "current"],
+referencedClasses: ["ProtocolRemoved", "SystemAnnouncer"]
+}),
+smalltalk.ClassOrganizer);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "theClass",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+ return self.theClass ;
+return self}, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ClassOrganizer)})},
+args: [],
+source: "theClass\x0a\x09< return self.theClass >",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.ClassOrganizer);
+
+
+
+smalltalk.addClass('PackageOrganizer', smalltalk.Organizer, [], 'Kernel-Infrastructure');
+smalltalk.PackageOrganizer.comment="I am an organizer specific to packages. I hold classes categorization information.";
+
+
+smalltalk.addClass('Package', smalltalk.Object, ['extension'], 'Kernel-Infrastructure');
+smalltalk.Package.comment="I am similar to a \x22class category\x22 typically found in other Smalltalks like Pharo or Squeak. Amber does not have class categories anymore, it had in the beginning but now each class in the system knows which package it belongs to.\x0a\x0aEach package has a name and can be queried for its classes, but it will then resort to a reverse scan of all classes to find them.\x0a\x0a## API\x0a\x0aPackages are manipulated through \x22Smalltalk current\x22, like for example finding one based on a name or with `Package class >> #name` directly:\x0a\x0a    Smalltalk current packageAt: 'Kernel'\x0a    Package named: 'Kernel'\x0a\x0aA package differs slightly from a Monticello package which can span multiple class categories using a naming convention based on hyphenation. But just as in Monticello a package supports \x22class extensions\x22 so a package can define behaviors in foreign classes using a naming convention for method categories where the category starts with an asterisk and then the name of the owning package follows.\x0a\x0aYou can fetch a package from the server:\x0a\x0a\x09Package load: 'Additional-Examples'";
+smalltalk.addMethod(
+smalltalk.method({
+selector: "classes",
+category: 'classes',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(self._organization())._elements();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Package)})},
+args: [],
+source: "classes\x0a\x09^ self organization elements",
+messageSends: ["elements", "organization"],
+referencedClasses: []
+}),
+smalltalk.Package);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "isPackage",
+category: 'testing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return true;
+}, function($ctx1) {$ctx1.fill(self,"isPackage",{},smalltalk.Package)})},
+args: [],
+source: "isPackage\x0a\x09^ true",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Package);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "loadDependencies",
+category: 'dependencies',
+fn: function (){
+var self=this;
+var classes,packages;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$3,$1;
+classes=self._loadDependencyClasses();
+$2=_st(_st(classes)._collect_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(each)._package();
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._asSet();
+_st($2)._remove_ifAbsent_(self,(function(){
+return smalltalk.withContext(function($ctx2) {
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+$3=_st($2)._yourself();
+$1=$3;
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"loadDependencies",{classes:classes,packages:packages},smalltalk.Package)})},
+args: [],
+source: "loadDependencies\x0a\x09\x22Returns list of packages that need to be loaded\x0a\x09before loading this package.\x22\x0a\x09\x0a\x09| classes packages |\x0a\x09classes := self loadDependencyClasses.\x0a\x09^(classes collect: [ :each | each package ]) asSet\x0a\x09\x09remove: self ifAbsent: [];\x0a\x09\x09yourself",
+messageSends: ["loadDependencyClasses", "remove:ifAbsent:", "asSet", "collect:", "package", "yourself"],
+referencedClasses: []
+}),
+smalltalk.Package);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "loadDependencyClasses",
+category: 'dependencies',
+fn: function (){
+var self=this;
+var starCategoryName;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+return smalltalk.withContext(function($ctx1) { 
+var $2,$3,$1;
+starCategoryName="*".__comma(self._name());
+$2=_st(_st(self._classes())._collect_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(each)._superclass();
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._asSet();
+_st($2)._remove_ifAbsent_(nil,(function(){
+return smalltalk.withContext(function($ctx2) {
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+_st($2)._addAll_(_st(_st(_st($Smalltalk())._current())._classes())._select_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(_st(each)._protocols())._includes_(starCategoryName);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})));
+$3=_st($2)._yourself();
+$1=$3;
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"loadDependencyClasses",{starCategoryName:starCategoryName},smalltalk.Package)})},
+args: [],
+source: "loadDependencyClasses\x0a\x09\x22Returns classes needed at the time of loading a package.\x0a\x09These are all that are used to subclass\x0a\x09and to define an extension method\x22\x0a\x09\x0a\x09| starCategoryName |\x0a\x09starCategoryName := '*', self name.\x0a\x09^(self classes collect: [ :each | each superclass ]) asSet\x0a\x09\x09remove: nil ifAbsent: [];\x0a\x09\x09addAll: (Smalltalk current classes select: [ :each | each protocols includes: starCategoryName ]);\x0a\x09\x09yourself",
+messageSends: [",", "name", "remove:ifAbsent:", "asSet", "collect:", "superclass", "classes", "addAll:", "select:", "includes:", "protocols", "current", "yourself"],
+referencedClasses: ["Smalltalk"]
+}),
+smalltalk.Package);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "name",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self.pkgName;
+return self}, function($ctx1) {$ctx1.fill(self,"name",{},smalltalk.Package)})},
+args: [],
+source: "name\x0a\x09<return self.pkgName>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Package);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "name:",
+category: 'accessing',
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self.pkgName = aString;
+return self}, function($ctx1) {$ctx1.fill(self,"name:",{aString:aString},smalltalk.Package)})},
+args: ["aString"],
+source: "name: aString\x0a\x09<self.pkgName = aString>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Package);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "organization",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=self._basicAt_("organization");
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"organization",{},smalltalk.Package)})},
+args: [],
+source: "organization\x0a\x09^ self basicAt: 'organization'",
+messageSends: ["basicAt:"],
+referencedClasses: []
+}),
+smalltalk.Package);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "printOn:",
+category: 'printing',
+fn: function (aStream){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+smalltalk.Package.superclass.fn.prototype._printOn_.apply(_st(self), [aStream]);
+$1=aStream;
+_st($1)._nextPutAll_(" (");
+_st($1)._nextPutAll_(self._name());
+$2=_st($1)._nextPutAll_(")");
+return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Package)})},
+args: ["aStream"],
+source: "printOn: aStream\x0a\x09super printOn: aStream.\x0a\x09aStream \x0a\x09\x09nextPutAll: ' (';\x0a\x09\x09nextPutAll: self name;\x0a\x09\x09nextPutAll: ')'",
+messageSends: ["printOn:", "nextPutAll:", "name"],
+referencedClasses: []
+}),
+smalltalk.Package);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "setupClasses",
+category: 'classes',
+fn: function (){
+var self=this;
+function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+$1=self._classes();
+_st($1)._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(_st($ClassBuilder())._new())._setupClass_(each);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+$2=_st($1)._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(each)._initialize();
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"setupClasses",{},smalltalk.Package)})},
+args: [],
+source: "setupClasses\x0a\x09self classes\x0a\x09\x09do: [ :each | ClassBuilder new setupClass: each ];\x0a\x09\x09do: [ :each | each initialize ]",
+messageSends: ["do:", "setupClass:", "new", "classes", "initialize"],
+referencedClasses: ["ClassBuilder"]
+}),
+smalltalk.Package);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "sortedClasses",
+category: 'classes',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(self._class())._sortedClasses_(self._classes());
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"sortedClasses",{},smalltalk.Package)})},
+args: [],
+source: "sortedClasses\x0a\x09\x22Answer all classes in the receiver, sorted by superclass/subclasses and by class name for common subclasses (Issue #143).\x22\x0a\x0a\x09^self class sortedClasses: self classes",
+messageSends: ["sortedClasses:", "classes", "class"],
+referencedClasses: []
+}),
+smalltalk.Package);
+
+
+smalltalk.Package.klass.iVarNames = ['defaultCommitPathJs','defaultCommitPathSt'];
+smalltalk.addMethod(
+smalltalk.method({
+selector: "load:",
+category: 'loading-storing',
+fn: function (aPackageName){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self._deprecatedAPI();
+self._load_prefix_(aPackageName,_st(self._defaultCommitPathJs()).__comma("/"));
+return self}, function($ctx1) {$ctx1.fill(self,"load:",{aPackageName:aPackageName},smalltalk.Package.klass)})},
+args: ["aPackageName"],
+source: "load: aPackageName\x0a\x09self deprecatedAPI.\x0a\x09self load: aPackageName prefix: self defaultCommitPathJs, '/'",
+messageSends: ["deprecatedAPI", "load:prefix:", ",", "defaultCommitPathJs"],
+referencedClasses: []
+}),
+smalltalk.Package.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "load:prefix:",
+category: 'loading-storing',
+fn: function (aPackageName,aPrefix){
+var self=this;
+function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
+function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
+return smalltalk.withContext(function($ctx1) { 
+self._deprecatedAPI();
+_st($PlatformInterface())._ajax_(smalltalk.HashedCollection._from_(["url".__minus_gt(_st(_st(aPrefix).__comma(aPackageName)).__comma(".js")),"dataType".__minus_gt("script"),"success".__minus_gt((function(){
+return smalltalk.withContext(function($ctx2) {
+return _st(_st($Package())._named_(aPackageName))._setupClasses();
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))]));
+return self}, function($ctx1) {$ctx1.fill(self,"load:prefix:",{aPackageName:aPackageName,aPrefix:aPrefix},smalltalk.Package.klass)})},
+args: ["aPackageName", "aPrefix"],
+source: "load: aPackageName prefix: aPrefix\x0a\x09self deprecatedAPI.\x0a\x09PlatformInterface ajax: #{\x0a\x09\x09'url' -> (aPrefix , aPackageName , '.js').\x0a\x09\x09'dataType' -> 'script'.\x0a\x09\x09'success' -> [\x0a\x09\x09\x09(Package named: aPackageName) setupClasses ]\x0a\x09}",
+messageSends: ["deprecatedAPI", "ajax:", "->", ",", "setupClasses", "named:"],
+referencedClasses: ["Package", "PlatformInterface"]
+}),
+smalltalk.Package.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "named:",
+category: 'accessing',
+fn: function (aPackageName){
+var self=this;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st($Smalltalk())._current())._packageAt_(aPackageName);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"named:",{aPackageName:aPackageName},smalltalk.Package.klass)})},
+args: ["aPackageName"],
+source: "named: aPackageName\x0a\x0a\x09^Smalltalk current packageAt: aPackageName",
+messageSends: ["packageAt:", "current"],
+referencedClasses: ["Smalltalk"]
+}),
+smalltalk.Package.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "named:ifAbsent:",
+category: 'accessing',
+fn: function (aPackageName,aBlock){
+var self=this;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st($Smalltalk())._current())._packageAt_ifAbsent_(aPackageName,aBlock);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"named:ifAbsent:",{aPackageName:aPackageName,aBlock:aBlock},smalltalk.Package.klass)})},
+args: ["aPackageName", "aBlock"],
+source: "named: aPackageName ifAbsent: aBlock\x0a\x0a\x09^Smalltalk current packageAt: aPackageName ifAbsent: aBlock",
+messageSends: ["packageAt:ifAbsent:", "current"],
+referencedClasses: ["Smalltalk"]
+}),
+smalltalk.Package.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "sortedClasses:",
+category: 'sorting',
+fn: function (classes){
+var self=this;
+var children,others,nodes,expandedClasses;
+function $ClassSorterNode(){return smalltalk.ClassSorterNode||(typeof ClassSorterNode=="undefined"?nil:ClassSorterNode)}
+function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+children=[];
+others=[];
+_st(classes)._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
+$1=_st(classes)._includes_(_st(each)._superclass());
+if(smalltalk.assert($1)){
+return _st(others)._add_(each);
+} else {
+return _st(children)._add_(each);
+};
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+nodes=_st(children)._collect_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st($ClassSorterNode())._on_classes_level_(each,others,(0));
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+nodes=_st(nodes)._sorted_((function(a,b){
+return smalltalk.withContext(function($ctx2) {
+return _st(_st(_st(a)._theClass())._name()).__lt_eq(_st(_st(b)._theClass())._name());
+}, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
+expandedClasses=_st($Array())._new();
+_st(nodes)._do_((function(aNode){
+return smalltalk.withContext(function($ctx2) {
+return _st(aNode)._traverseClassesWith_(expandedClasses);
+}, function($ctx2) {$ctx2.fillBlock({aNode:aNode},$ctx1)})}));
+$2=expandedClasses;
+return $2;
+}, function($ctx1) {$ctx1.fill(self,"sortedClasses:",{classes:classes,children:children,others:others,nodes:nodes,expandedClasses:expandedClasses},smalltalk.Package.klass)})},
+args: ["classes"],
+source: "sortedClasses: classes\x0a\x09\x22Answer classes, sorted by superclass/subclasses and by class name for common subclasses (Issue #143)\x22\x0a\x0a\x09| children others nodes expandedClasses |\x0a\x09children := #().\x0a\x09others := #().\x0a\x09classes do: [:each |\x0a\x09\x09(classes includes: each superclass)\x0a\x09\x09\x09ifFalse: [children add: each]\x0a\x09\x09\x09ifTrue: [others add: each]].\x0a\x09nodes := children collect: [:each |\x0a\x09\x09ClassSorterNode on: each classes: others level: 0].\x0a\x09nodes := nodes sorted: [:a :b | a theClass name <= b theClass name ].\x0a\x09expandedClasses := Array new.\x0a\x09nodes do: [:aNode |\x0a\x09\x09aNode traverseClassesWith: expandedClasses].\x0a\x09^expandedClasses",
+messageSends: ["do:", "ifFalse:ifTrue:", "add:", "includes:", "superclass", "collect:", "on:classes:level:", "sorted:", "<=", "name", "theClass", "new", "traverseClassesWith:"],
+referencedClasses: ["ClassSorterNode", "Array"]
+}),
+smalltalk.Package.klass);
+
+
+smalltalk.addClass('PlatformInterface', smalltalk.Object, [], 'Kernel-Infrastructure');
+smalltalk.PlatformInterface.comment="I am single entry point to UI and environment interface.\x0aMy `initialize` tries several options (for now, browser environment only) to set myself up.\x0a\x0a## API\x0a\x0a    PlatformInterface alert: 'Hey, there is a problem'.\x0a    PlatformInterface confirm: 'Affirmative?'.\x0a    PlatformInterface prompt: 'Your name:'.\x0a\x0a    PlatformInterface ajax: #{\x0a        'url' -> '/patch.js'. 'type' -> 'GET'. dataType->'script'\x0a    }.\x0a";
+
+smalltalk.PlatformInterface.klass.iVarNames = ['worker'];
+smalltalk.addMethod(
+smalltalk.method({
+selector: "ajax:",
+category: 'actions',
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@worker"];
+if(($receiver = $2) == nil || $receiver == undefined){
+$1=self._error_("ajax: not available");
+} else {
+$1=_st(self["@worker"])._ajax_(anObject);
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"ajax:",{anObject:anObject},smalltalk.PlatformInterface.klass)})},
+args: ["anObject"],
+source: "ajax: anObject\x0a\x09^worker\x0a\x09\x09ifNotNil: [ worker ajax: anObject ]\x0a\x09\x09ifNil: [ self error: 'ajax: not available' ]",
+messageSends: ["ifNotNil:ifNil:", "ajax:", "error:"],
+referencedClasses: []
+}),
+smalltalk.PlatformInterface.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "alert:",
+category: 'actions',
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@worker"];
+if(($receiver = $2) == nil || $receiver == undefined){
+$1=self._error_("alert: not available");
+} else {
+$1=_st(self["@worker"])._alert_(aString);
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},smalltalk.PlatformInterface.klass)})},
+args: ["aString"],
+source: "alert: aString\x0a\x09^worker\x0a\x09\x09ifNotNil: [ worker alert: aString ]\x0a\x09\x09ifNil: [ self error: 'alert: not available' ]",
+messageSends: ["ifNotNil:ifNil:", "alert:", "error:"],
+referencedClasses: []
+}),
+smalltalk.PlatformInterface.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "confirm:",
+category: 'actions',
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@worker"];
+if(($receiver = $2) == nil || $receiver == undefined){
+$1=self._error_("confirm: not available");
+} else {
+$1=_st(self["@worker"])._confirm_(aString);
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"confirm:",{aString:aString},smalltalk.PlatformInterface.klass)})},
+args: ["aString"],
+source: "confirm: aString\x0a\x09^worker\x0a\x09\x09ifNotNil: [ worker confirm: aString ]\x0a\x09\x09ifNil: [ self error: 'confirm: not available' ]",
+messageSends: ["ifNotNil:ifNil:", "confirm:", "error:"],
+referencedClasses: []
+}),
+smalltalk.PlatformInterface.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "existsGlobal:",
+category: 'actions',
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+
+	var f = new Function('aString',
+	'if (/^[0-9]/.test(aString) || !/^[\\w_]+$/.test(aString))\n'+
+	'	return false;\n'+
+	'try { eval(aString); return true; } catch (ex) {}\n'+
+	'return false;');
+	return f(aString);;
+return self}, function($ctx1) {$ctx1.fill(self,"existsGlobal:",{aString:aString},smalltalk.PlatformInterface.klass)})},
+args: ["aString"],
+source: "existsGlobal: aString\x0a<\x0a\x09var f = new Function('aString',\x0a\x09'if (/^[0-9]/.test(aString) || !/^[\x5c\x5cw_]+$/.test(aString))\x5cn'+\x0a\x09'\x09return false;\x5cn'+\x0a\x09'try { eval(aString); return true; } catch (ex) {}\x5cn'+\x0a\x09'return false;');\x0a\x09return f(aString);\x0a>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.PlatformInterface.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "initialize",
+category: 'initialization',
+fn: function (){
+var self=this;
+var candidate;
+function $BrowserInterface(){return smalltalk.BrowserInterface||(typeof BrowserInterface=="undefined"?nil:BrowserInterface)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2,$3;
+smalltalk.PlatformInterface.klass.superclass.fn.prototype._initialize.apply(_st(self), []);
+$1=$BrowserInterface();
+if(($receiver = $1) == nil || $receiver == undefined){
+$1;
+} else {
+candidate=_st($BrowserInterface())._new();
+candidate;
+$2=_st(candidate)._isAvailable();
+if(smalltalk.assert($2)){
+self._setWorker_(candidate);
+$3=self;
+return $3;
+};
+};
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{candidate:candidate},smalltalk.PlatformInterface.klass)})},
+args: [],
+source: "initialize\x0a\x09| candidate |\x0a\x09\x0a\x09super initialize.\x0a\x09\x0a\x09BrowserInterface ifNotNil: [\x0a\x09\x09candidate := BrowserInterface new.\x0a\x09\x09candidate isAvailable ifTrue: [ self setWorker: candidate. ^self ]\x0a\x09]",
+messageSends: ["initialize", "ifNotNil:", "new", "ifTrue:", "setWorker:", "isAvailable"],
+referencedClasses: ["BrowserInterface"]
+}),
+smalltalk.PlatformInterface.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "prompt:",
+category: 'actions',
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@worker"];
+if(($receiver = $2) == nil || $receiver == undefined){
+$1=self._error_("prompt: not available");
+} else {
+$1=_st(self["@worker"])._prompt_(aString);
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"prompt:",{aString:aString},smalltalk.PlatformInterface.klass)})},
+args: ["aString"],
+source: "prompt: aString\x0a\x09^worker\x0a\x09\x09ifNotNil: [ worker prompt: aString ]\x0a\x09\x09ifNil: [ self error: 'prompt: not available' ]",
+messageSends: ["ifNotNil:ifNil:", "prompt:", "error:"],
+referencedClasses: []
+}),
+smalltalk.PlatformInterface.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "setWorker:",
+category: 'accessing',
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self["@worker"]=anObject;
+return self}, function($ctx1) {$ctx1.fill(self,"setWorker:",{anObject:anObject},smalltalk.PlatformInterface.klass)})},
+args: ["anObject"],
+source: "setWorker: anObject\x0a\x09worker := anObject",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.PlatformInterface.klass);
+
+
+smalltalk.addClass('ProgressHandler', smalltalk.Object, [], 'Kernel-Infrastructure');
+smalltalk.ProgressHandler.comment="I am used to manage progress in collection iterations, see `SequenceableCollection >> #do:displayingProgress:`.\x0a\x0aSubclasses of can register themselves as the current handler with\x0a`ProgressHandler class >> register`.\x0a\x0aThe default behavior is to simply iterate over the collection.";
+smalltalk.addMethod(
+smalltalk.method({
+selector: "do:on:displaying:",
+category: 'progress handling',
+fn: function (aBlock,aCollection,aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(aCollection)._do_(aBlock);
+return self}, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString},smalltalk.ProgressHandler)})},
+args: ["aBlock", "aCollection", "aString"],
+source: "do: aBlock on: aCollection displaying: aString\x0a\x09aCollection do: aBlock",
+messageSends: ["do:"],
+referencedClasses: []
+}),
+smalltalk.ProgressHandler);
+
+
+smalltalk.ProgressHandler.klass.iVarNames = ['current'];
+smalltalk.addMethod(
+smalltalk.method({
+selector: "current",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@current"];
+if(($receiver = $2) == nil || $receiver == undefined){
+self["@current"]=self._new();
+$1=self["@current"];
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.ProgressHandler.klass)})},
+args: [],
+source: "current\x0a\x09^current ifNil: [ current := self new ]",
+messageSends: ["ifNil:", "new"],
+referencedClasses: []
+}),
+smalltalk.ProgressHandler.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "initialize",
+category: 'initialization',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self._register();
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.ProgressHandler.klass)})},
+args: [],
+source: "initialize\x0a\x09self register",
+messageSends: ["register"],
+referencedClasses: []
+}),
+smalltalk.ProgressHandler.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "register",
+category: 'initialization',
+fn: function (){
+var self=this;
+function $ProgressHandler(){return smalltalk.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
+return smalltalk.withContext(function($ctx1) { 
+_st($ProgressHandler())._setCurrent_(self._new());
+return self}, function($ctx1) {$ctx1.fill(self,"register",{},smalltalk.ProgressHandler.klass)})},
+args: [],
+source: "register\x0a\x09ProgressHandler setCurrent: self new",
+messageSends: ["setCurrent:", "new"],
+referencedClasses: ["ProgressHandler"]
+}),
+smalltalk.ProgressHandler.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "setCurrent:",
+category: 'accessing',
+fn: function (anHandler){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self["@current"]=anHandler;
+return self}, function($ctx1) {$ctx1.fill(self,"setCurrent:",{anHandler:anHandler},smalltalk.ProgressHandler.klass)})},
+args: ["anHandler"],
+source: "setCurrent: anHandler\x0a\x09current := anHandler",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.ProgressHandler.klass);
+
+
+smalltalk.addClass('Smalltalk', smalltalk.Object, [], 'Kernel-Infrastructure');
+smalltalk.Smalltalk.comment="I represent the global JavaScript variable `smalltalk` declared in `js/boot.js`.\x0a\x0a## API\x0a\x0aI have only one instance, accessed with class-side method `#current`.\x0a\x0aThe `smalltalk` object holds all class and packages defined in the system.\x0a\x0a## Classes\x0a\x0aClasses can be accessed using the following methods:\x0a\x0a- `#classes` answers the full list of Smalltalk classes in the system\x0a- `#at:` answers a specific class or `nil`\x0a\x0a## Packages\x0a\x0aPackages can be accessed using the following methods:\x0a\x0a- `#packages` answers the full list of packages\x0a- `#packageAt:` answers a specific package or `nil`\x0a\x0a## Parsing\x0a\x0aThe `#parse:` method is used to parse Amber source code.\x0aIt requires the `Compiler` package and the `js/parser.js` parser file in order to work.";
+smalltalk.addMethod(
+smalltalk.method({
+selector: "addGlobalJsVariable:",
+category: 'globals',
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(self._globalJsVariables())._add_(aString);
+return self}, function($ctx1) {$ctx1.fill(self,"addGlobalJsVariable:",{aString:aString},smalltalk.Smalltalk)})},
+args: ["aString"],
+source: "addGlobalJsVariable: aString\x0a\x09self globalJsVariables add: aString",
+messageSends: ["add:", "globalJsVariables"],
+referencedClasses: []
+}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "asSmalltalkException:",
+category: 'error handling',
+fn: function (anObject){
+var self=this;
+function $JavaScriptException(){return smalltalk.JavaScriptException||(typeof JavaScriptException=="undefined"?nil:JavaScriptException)}
+function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=_st(self._isSmalltalkObject_(anObject))._and_((function(){
+return smalltalk.withContext(function($ctx2) {
+return _st(anObject)._isKindOf_($Error());
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+if(smalltalk.assert($2)){
+$1=anObject;
+} else {
+$1=_st($JavaScriptException())._on_(anObject);
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"asSmalltalkException:",{anObject:anObject},smalltalk.Smalltalk)})},
+args: ["anObject"],
+source: "asSmalltalkException: anObject\x0a\x09\x22A JavaScript exception may be thrown.\x0a\x09We then need to convert it back to a Smalltalk object\x22\x0a\x09\x0a\x09^ ((self isSmalltalkObject: anObject) and: [ anObject isKindOf: Error ])\x0a\x09\x09ifTrue: [ anObject ]\x0a\x09\x09ifFalse: [ JavaScriptException on: anObject ]",
+messageSends: ["ifTrue:ifFalse:", "on:", "and:", "isKindOf:", "isSmalltalkObject:"],
+referencedClasses: ["JavaScriptException", "Error"]
+}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "at:",
+category: 'accessing',
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self[aString];
+return self}, function($ctx1) {$ctx1.fill(self,"at:",{aString:aString},smalltalk.Smalltalk)})},
+args: ["aString"],
+source: "at: aString\x0a\x09<return self[aString]>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "basicParse:",
+category: 'private',
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return smalltalk.parser.parse(aString);
+return self}, function($ctx1) {$ctx1.fill(self,"basicParse:",{aString:aString},smalltalk.Smalltalk)})},
+args: ["aString"],
+source: "basicParse: aString\x0a\x09<return smalltalk.parser.parse(aString)>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "classes",
+category: 'classes',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self.classes();
+return self}, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Smalltalk)})},
+args: [],
+source: "classes\x0a\x09<return self.classes()>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "createPackage:",
+category: 'packages',
+fn: function (packageName){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return smalltalk.addPackage(packageName);
+return self}, function($ctx1) {$ctx1.fill(self,"createPackage:",{packageName:packageName},smalltalk.Smalltalk)})},
+args: ["packageName"],
+source: "createPackage: packageName\x0a\x09\x22Create and bind a new package with given name and return it.\x22\x0a\x09<return smalltalk.addPackage(packageName)>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "createPackage:properties:",
+category: 'private',
+fn: function (packageName,aDict){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+self._deprecatedAPI();
+$1=_st(aDict)._isEmpty();
+if(! smalltalk.assert($1)){
+self._error_("createPackage:properties: called with nonempty properties");
+};
+$2=self._createPackage_(packageName);
+return $2;
+}, function($ctx1) {$ctx1.fill(self,"createPackage:properties:",{packageName:packageName,aDict:aDict},smalltalk.Smalltalk)})},
+args: ["packageName", "aDict"],
+source: "createPackage: packageName properties: aDict\x0a\x09\x22Needed to import .st files: they begin with this call.\x22\x0a\x09self deprecatedAPI.\x0a\x09\x0a\x09aDict isEmpty ifFalse: [ self error: 'createPackage:properties: called with nonempty properties' ].\x0a\x09^ self createPackage: packageName",
+messageSends: ["deprecatedAPI", "ifFalse:", "error:", "isEmpty", "createPackage:"],
+referencedClasses: []
+}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "deleteClass:",
+category: 'classes',
+fn: function (aClass){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self.removeClass(aClass);
+return self}, function($ctx1) {$ctx1.fill(self,"deleteClass:",{aClass:aClass},smalltalk.Smalltalk)})},
+args: ["aClass"],
+source: "deleteClass: aClass\x0a\x09\x22Deletes a class by deleting its binding only. Use #removeClass instead\x22\x0a\x09\x0a\x09<self.removeClass(aClass)>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "deleteGlobalJsVariable:",
+category: 'globals',
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(self._globalJsVariables())._remove_ifAbsent_(aString,(function(){
+return smalltalk.withContext(function($ctx2) {
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"deleteGlobalJsVariable:",{aString:aString},smalltalk.Smalltalk)})},
+args: ["aString"],
+source: "deleteGlobalJsVariable: aString\x0a\x09self globalJsVariables remove: aString ifAbsent:[]",
+messageSends: ["remove:ifAbsent:", "globalJsVariables"],
+referencedClasses: []
+}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "deletePackage:",
+category: 'packages',
+fn: function (packageName){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+delete smalltalk.packages[packageName];
+return self}, function($ctx1) {$ctx1.fill(self,"deletePackage:",{packageName:packageName},smalltalk.Smalltalk)})},
+args: ["packageName"],
+source: "deletePackage: packageName\x0a\x09\x22Deletes a package by deleting its binding, but does not check if it contains classes etc.\x0a\x09To remove a package, use #removePackage instead.\x22\x0a\x0a\x09<delete smalltalk.packages[packageName]>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "globalJsVariables",
+category: 'globals',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self.globalJsVariables;
+return self}, function($ctx1) {$ctx1.fill(self,"globalJsVariables",{},smalltalk.Smalltalk)})},
+args: [],
+source: "globalJsVariables\x0a\x09\x22Array of global JavaScript variables\x22\x0a\x09<return self.globalJsVariables>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "isSmalltalkObject:",
+category: 'testing',
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return typeof anObject.klass !== 'undefined';
+return self}, function($ctx1) {$ctx1.fill(self,"isSmalltalkObject:",{anObject:anObject},smalltalk.Smalltalk)})},
+args: ["anObject"],
+source: "isSmalltalkObject: anObject\x0a\x09\x22Consider anObject a Smalltalk object if it has a 'klass' property.\x0a\x09Note that this may be unaccurate\x22\x0a\x09\x0a\x09<return typeof anObject.klass !== 'undefined'>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "packageAt:",
+category: 'packages',
+fn: function (packageName){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self.packages[packageName];
+return self}, function($ctx1) {$ctx1.fill(self,"packageAt:",{packageName:packageName},smalltalk.Smalltalk)})},
+args: ["packageName"],
+source: "packageAt: packageName\x0a\x09<return self.packages[packageName]>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "packageAt:ifAbsent:",
+category: 'packages',
+fn: function (packageName,aBlock){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self._packageAt_(packageName);
+$1=_st($2)._ifNil_(aBlock);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"packageAt:ifAbsent:",{packageName:packageName,aBlock:aBlock},smalltalk.Smalltalk)})},
+args: ["packageName", "aBlock"],
+source: "packageAt: packageName ifAbsent: aBlock\x0a\x09^(self packageAt: packageName) ifNil: aBlock",
+messageSends: ["ifNil:", "packageAt:"],
+referencedClasses: []
+}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "packages",
+category: 'packages',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self.packages.all();
+return self}, function($ctx1) {$ctx1.fill(self,"packages",{},smalltalk.Smalltalk)})},
+args: [],
+source: "packages\x0a\x09\x22Return all Package instances in the system.\x22\x0a\x0a\x09<return self.packages.all()>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "parse:",
+category: 'accessing',
+fn: function (aString){
+var self=this;
+var result;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$3,$1;
+self._try_catch_((function(){
+return smalltalk.withContext(function($ctx2) {
+result=self._basicParse_(aString);
+return result;
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(ex){
+return smalltalk.withContext(function($ctx2) {
+return _st(self._parseError_parsing_(ex,aString))._signal();
+}, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
+$2=result;
+_st($2)._source_(aString);
+$3=_st($2)._yourself();
+$1=$3;
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"parse:",{aString:aString,result:result},smalltalk.Smalltalk)})},
+args: ["aString"],
+source: "parse: aString\x0a\x09| result |\x0a\x09\x0a\x09self \x0a\x09\x09try: [result := self basicParse: aString] \x0a\x09\x09catch: [:ex | (self parseError: ex parsing: aString) signal].\x0a\x09\x09\x0a\x09^ result\x0a\x09\x09source: aString;\x0a\x09\x09yourself",
+messageSends: ["try:catch:", "basicParse:", "signal", "parseError:parsing:", "source:", "yourself"],
+referencedClasses: []
+}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "parseError:parsing:",
+category: 'error handling',
+fn: function (anException,aString){
+var self=this;
+function $ParseError(){return smalltalk.ParseError||(typeof ParseError=="undefined"?nil:ParseError)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st($ParseError())._new())._messageText_(_st(_st(_st(_st("Parse error on line ".__comma(_st(anException)._basicAt_("line"))).__comma(" column ")).__comma(_st(anException)._basicAt_("column"))).__comma(" : Unexpected character ")).__comma(_st(anException)._basicAt_("found")));
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"parseError:parsing:",{anException:anException,aString:aString},smalltalk.Smalltalk)})},
+args: ["anException", "aString"],
+source: "parseError: anException parsing: aString\x0a\x09^ ParseError new messageText: 'Parse error on line ', (anException basicAt: 'line') ,' column ' , (anException basicAt: 'column') ,' : Unexpected character ', (anException basicAt: 'found')",
+messageSends: ["messageText:", ",", "basicAt:", "new"],
+referencedClasses: ["ParseError"]
+}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "pseudoVariableNames",
+category: 'packages',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=["self", "super", "nil", "true", "false", "thisContext"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"pseudoVariableNames",{},smalltalk.Smalltalk)})},
+args: [],
+source: "pseudoVariableNames\x0a\x09^ #('self' 'super' 'nil' 'true' 'false' 'thisContext')",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "readJSObject:",
+category: 'accessing',
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self.readJSObject(anObject);
+return self}, function($ctx1) {$ctx1.fill(self,"readJSObject:",{anObject:anObject},smalltalk.Smalltalk)})},
+args: ["anObject"],
+source: "readJSObject: anObject\x0a\x09<return self.readJSObject(anObject)>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "removeClass:",
+category: 'classes',
+fn: function (aClass){
+var self=this;
+function $ClassRemoved(){return smalltalk.ClassRemoved||(typeof ClassRemoved=="undefined"?nil:ClassRemoved)}
+function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2,$3;
+$1=_st(aClass)._isMetaclass();
+if(smalltalk.assert($1)){
+self._error_(_st(_st(aClass)._asString()).__comma(" is a Metaclass and cannot be removed!"));
+};
+self._deleteClass_(aClass);
+$2=_st($ClassRemoved())._new();
+_st($2)._theClass_(aClass);
+$3=_st($2)._yourself();
+_st(_st($SystemAnnouncer())._current())._announce_($3);
+return self}, function($ctx1) {$ctx1.fill(self,"removeClass:",{aClass:aClass},smalltalk.Smalltalk)})},
+args: ["aClass"],
+source: "removeClass: aClass\x0a\x09aClass isMetaclass ifTrue: [self error: aClass asString, ' is a Metaclass and cannot be removed!'].\x0a\x09\x0a\x09self deleteClass: aClass.\x0a\x09\x0a\x09SystemAnnouncer current\x0a\x09\x09announce: (ClassRemoved new\x0a\x09\x09\x09theClass: aClass;\x0a\x09\x09\x09yourself)",
+messageSends: ["ifTrue:", "error:", ",", "asString", "isMetaclass", "deleteClass:", "announce:", "theClass:", "new", "yourself", "current"],
+referencedClasses: ["ClassRemoved", "SystemAnnouncer"]
+}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "removePackage:",
+category: 'packages',
+fn: function (packageName){
+var self=this;
+var pkg;
+return smalltalk.withContext(function($ctx1) { 
+pkg=self._packageAt_ifAbsent_(packageName,(function(){
+return smalltalk.withContext(function($ctx2) {
+return self._error_("Missing package: ".__comma(packageName));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+_st(_st(pkg)._classes())._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return self._removeClass_(each);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+self._deletePackage_(packageName);
+return self}, function($ctx1) {$ctx1.fill(self,"removePackage:",{packageName:packageName,pkg:pkg},smalltalk.Smalltalk)})},
+args: ["packageName"],
+source: "removePackage: packageName\x0a\x09\x22Removes a package and all its classes.\x22\x0a\x0a\x09| pkg |\x0a\x09pkg := self packageAt: packageName ifAbsent: [self error: 'Missing package: ', packageName].\x0a\x09pkg classes do: [:each |\x0a\x09\x09\x09self removeClass: each].\x0a\x09self deletePackage: packageName",
+messageSends: ["packageAt:ifAbsent:", "error:", ",", "do:", "removeClass:", "classes", "deletePackage:"],
+referencedClasses: []
+}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renamePackage:to:",
+category: 'packages',
+fn: function (packageName,newName){
+var self=this;
+var pkg;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+pkg=self._packageAt_ifAbsent_(packageName,(function(){
+return smalltalk.withContext(function($ctx2) {
+return self._error_("Missing package: ".__comma(packageName));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+$1=self._packageAt_(newName);
+if(($receiver = $1) == nil || $receiver == undefined){
+$1;
+} else {
+self._error_("Already exists a package called: ".__comma(newName));
+};
+_st(self._basicAt_("packages"))._at_put_(newName,pkg);
+_st(pkg)._name_(newName);
+self._deletePackage_(packageName);
+return self}, function($ctx1) {$ctx1.fill(self,"renamePackage:to:",{packageName:packageName,newName:newName,pkg:pkg},smalltalk.Smalltalk)})},
+args: ["packageName", "newName"],
+source: "renamePackage: packageName to: newName\x0a\x09\x22Rename a package.\x22\x0a\x0a\x09| pkg |\x0a\x09pkg := self packageAt: packageName ifAbsent: [self error: 'Missing package: ', packageName].\x0a\x09(self packageAt: newName) ifNotNil: [self error: 'Already exists a package called: ', newName].\x0a\x09(self basicAt: 'packages') at: newName put: pkg.\x0a\x09pkg name: newName.\x0a\x09self deletePackage: packageName.",
+messageSends: ["packageAt:ifAbsent:", "error:", ",", "ifNotNil:", "packageAt:", "at:put:", "basicAt:", "name:", "deletePackage:"],
+referencedClasses: []
+}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "reservedWords",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self.reservedWords;
+return self}, function($ctx1) {$ctx1.fill(self,"reservedWords",{},smalltalk.Smalltalk)})},
+args: [],
+source: "reservedWords\x0a\x09\x22JavaScript reserved words\x22\x0a\x09<return self.reservedWords>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Smalltalk);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "version",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "0.11.0";
+}, function($ctx1) {$ctx1.fill(self,"version",{},smalltalk.Smalltalk)})},
+args: [],
+source: "version\x0a\x09\x22Answer the version string of Amber\x22\x0a\x09\x0a\x09^ '0.11.0'",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Smalltalk);
+
+
+smalltalk.Smalltalk.klass.iVarNames = ['current'];
+smalltalk.addMethod(
+smalltalk.method({
+selector: "current",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return smalltalk;
+return self}, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.Smalltalk.klass)})},
+args: [],
+source: "current\x0a\x09<return smalltalk>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Smalltalk.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "asJavaScriptSelector",
+category: '*Kernel-Infrastructure',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=self._replace_with_("^([a-zA-Z0-9]*).*$","$1");
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"asJavaScriptSelector",{},smalltalk.String)})},
+args: [],
+source: "asJavaScriptSelector\x0a\x09\x22Return first keyword of the selector, without trailing colon.\x22\x0a\x09^self replace: '^([a-zA-Z0-9]*).*$' with: '$1'",
+messageSends: ["replace:with:"],
+referencedClasses: []
+}),
+smalltalk.String);
+
+})(global_smalltalk,global_nil,global__st);

+ 62 - 7
js/Kernel-Methods.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Kernel-Methods');
+
 smalltalk.addClass('BlockClosure', smalltalk.Object, [], 'Kernel-Methods');
 smalltalk.addMethod(
 smalltalk.method({
@@ -1319,17 +1320,71 @@ smalltalk.method({
 selector: "exists:",
 fn: function (aString){
 var self=this;
+function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
 return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st($PlatformInterface())._existsGlobal_(aString);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"exists:",{aString:aString},smalltalk.NativeFunction.klass)})},
+messageSends: ["existsGlobal:"]}),
+smalltalk.NativeFunction.klass);
 
-		if(aString in window) {
-			return true
-		} else {
-			return false
-		}
+
+smalltalk.addClass('Timeout', smalltalk.Object, ['rawTimeout'], 'Kernel-Methods');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "clearInterval",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+
+		var interval = self["@rawTimeout"];
+		clearInterval(interval);
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"exists:",{aString:aString},smalltalk.NativeFunction.klass)})},
+return self}, function($ctx1) {$ctx1.fill(self,"clearInterval",{},smalltalk.Timeout)})},
 messageSends: []}),
-smalltalk.NativeFunction.klass);
+smalltalk.Timeout);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "clearTimeout",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
 
+		var timeout = self["@rawTimeout"];
+		clearTimeout(timeout);
+	;
+return self}, function($ctx1) {$ctx1.fill(self,"clearTimeout",{},smalltalk.Timeout)})},
+messageSends: []}),
+smalltalk.Timeout);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "rawTimeout:",
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self["@rawTimeout"]=anObject;
+return self}, function($ctx1) {$ctx1.fill(self,"rawTimeout:",{anObject:anObject},smalltalk.Timeout)})},
+messageSends: []}),
+smalltalk.Timeout);
+
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "on:",
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$3,$1;
+$2=self._new();
+_st($2)._rawTimeout_(anObject);
+$3=_st($2)._yourself();
+$1=$3;
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},smalltalk.Timeout.klass)})},
+messageSends: ["rawTimeout:", "new", "yourself"]}),
+smalltalk.Timeout.klass);
 
 })(global_smalltalk,global_nil,global__st);

+ 85 - 9
js/Kernel-Methods.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Kernel-Methods');
+
 smalltalk.addClass('BlockClosure', smalltalk.Object, [], 'Kernel-Methods');
 smalltalk.BlockClosure.comment="I represent a lexical closure.\x0aI am is directly mapped to JavaScript Function.\x0a\x0a## API\x0a\x0a1. Evaluation\x0a\x0a    My instances get evaluated with the `#value*` methods in the 'evaluating' protocol.\x0a\x0a    Example: ` [ :x | x + 1 ] value: 3 \x22Answers 4\x22 `\x0a\x0a2. Control structures\x0a\x0a    Blocks are used (together with `Boolean`) for control structures (methods in the `controlling` protocol).\x0a\x0a    Example: `aBlock whileTrue: [ ... ]`\x0a\x0a3. Error handling\x0a\x0a    I provide the `#on:do:` method for handling exceptions.\x0a\x0a    Example: ` aBlock on: MessageNotUnderstood do: [ :ex | ... ] `";
 smalltalk.addMethod(
@@ -1787,21 +1788,96 @@ selector: "exists:",
 category: 'testing',
 fn: function (aString){
 var self=this;
+function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
 return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st($PlatformInterface())._existsGlobal_(aString);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"exists:",{aString:aString},smalltalk.NativeFunction.klass)})},
+args: ["aString"],
+source: "exists: aString\x0a\x09^PlatformInterface existsGlobal: aString",
+messageSends: ["existsGlobal:"],
+referencedClasses: ["PlatformInterface"]
+}),
+smalltalk.NativeFunction.klass);
 
-		if(aString in window) {
-			return true
-		} else {
-			return false
-		}
+
+smalltalk.addClass('Timeout', smalltalk.Object, ['rawTimeout'], 'Kernel-Methods');
+smalltalk.Timeout.comment="I am wrapping the returns from `set{Timeout,Interval}`.\x0a\x0a## Motivation\x0a\x0aNumber suffices in browsers, but node.js returns an object.";
+smalltalk.addMethod(
+smalltalk.method({
+selector: "clearInterval",
+category: 'timeout/interval',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+
+		var interval = self["@rawTimeout"];
+		clearInterval(interval);
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"exists:",{aString:aString},smalltalk.NativeFunction.klass)})},
-args: ["aString"],
-source: "exists: aString\x0a\x09<\x0a\x09\x09if(aString in window) {\x0a\x09\x09\x09return true\x0a\x09\x09} else {\x0a\x09\x09\x09return false\x0a\x09\x09}\x0a\x09>",
+return self}, function($ctx1) {$ctx1.fill(self,"clearInterval",{},smalltalk.Timeout)})},
+args: [],
+source: "clearInterval\x0a\x09<\x0a\x09\x09var interval = self[\x22@rawTimeout\x22];\x0a\x09\x09clearInterval(interval);\x0a\x09>",
 messageSends: [],
 referencedClasses: []
 }),
-smalltalk.NativeFunction.klass);
+smalltalk.Timeout);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "clearTimeout",
+category: 'timeout/interval',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+
+		var timeout = self["@rawTimeout"];
+		clearTimeout(timeout);
+	;
+return self}, function($ctx1) {$ctx1.fill(self,"clearTimeout",{},smalltalk.Timeout)})},
+args: [],
+source: "clearTimeout\x0a\x09<\x0a\x09\x09var timeout = self[\x22@rawTimeout\x22];\x0a\x09\x09clearTimeout(timeout);\x0a\x09>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Timeout);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "rawTimeout:",
+category: 'accessing',
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self["@rawTimeout"]=anObject;
+return self}, function($ctx1) {$ctx1.fill(self,"rawTimeout:",{anObject:anObject},smalltalk.Timeout)})},
+args: ["anObject"],
+source: "rawTimeout: anObject\x0a\x09rawTimeout := anObject",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Timeout);
+
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "on:",
+category: 'instance creation',
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$3,$1;
+$2=self._new();
+_st($2)._rawTimeout_(anObject);
+$3=_st($2)._yourself();
+$1=$3;
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},smalltalk.Timeout.klass)})},
+args: ["anObject"],
+source: "on: anObject\x0a\x09^self new rawTimeout: anObject; yourself",
+messageSends: ["rawTimeout:", "new", "yourself"],
+referencedClasses: []
+}),
+smalltalk.Timeout.klass);
 
 })(global_smalltalk,global_nil,global__st);

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 506 - 2197
js/Kernel-Objects.deploy.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 721 - 2987
js/Kernel-Objects.js


+ 497 - 192
js/Kernel-Tests.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Kernel-Tests');
+
 smalltalk.addClass('BlockClosureTest', smalltalk.TestCase, [], 'Kernel-Tests');
 smalltalk.addMethod(
 smalltalk.method({
@@ -2288,6 +2289,165 @@ smalltalk.JavaScriptExceptionTest);
 
 
 
+smalltalk.addClass('LegacyPackageHandlerTest', smalltalk.TestCase, ['zorkPackage', 'grulPackage', 'backUpCommitPathJs', 'backUpCommitPathSt'], 'Kernel-Tests');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "setUp",
+fn: function (){
+var self=this;
+function $LegacyPackageHandler(){return smalltalk.LegacyPackageHandler||(typeof LegacyPackageHandler=="undefined"?nil:LegacyPackageHandler)}
+function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+self["@backUpCommitPathJs"]=_st($LegacyPackageHandler())._defaultCommitPathJs();
+self["@backUpCommitPathSt"]=_st($LegacyPackageHandler())._defaultCommitPathSt();
+_st($LegacyPackageHandler())._resetCommitPaths();
+self["@zorkPackage"]=_st(_st($Package())._new())._name_("Zork");
+$1=_st($Package())._new();
+_st($1)._name_("Grul");
+_st($1)._commitPathJs_("server/grul/js");
+_st($1)._commitPathSt_("grul/st");
+$2=_st($1)._yourself();
+self["@grulPackage"]=$2;
+return self}, function($ctx1) {$ctx1.fill(self,"setUp",{},smalltalk.LegacyPackageHandlerTest)})},
+messageSends: ["defaultCommitPathJs", "defaultCommitPathSt", "resetCommitPaths", "name:", "new", "commitPathJs:", "commitPathSt:", "yourself"]}),
+smalltalk.LegacyPackageHandlerTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "tearDown",
+fn: function (){
+var self=this;
+function $LegacyPackageHandler(){return smalltalk.LegacyPackageHandler||(typeof LegacyPackageHandler=="undefined"?nil:LegacyPackageHandler)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+$1=$LegacyPackageHandler();
+_st($1)._defaultCommitPathJs_(self["@backUpCommitPathJs"]);
+$2=_st($1)._defaultCommitPathSt_(self["@backUpCommitPathSt"]);
+return self}, function($ctx1) {$ctx1.fill(self,"tearDown",{},smalltalk.LegacyPackageHandlerTest)})},
+messageSends: ["defaultCommitPathJs:", "defaultCommitPathSt:"]}),
+smalltalk.LegacyPackageHandlerTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "testGrulCommitPathJsShouldBeServerGrulJs",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self._assert_equals_(_st(self["@grulPackage"])._commitPathJs(),"server/grul/js");
+return self}, function($ctx1) {$ctx1.fill(self,"testGrulCommitPathJsShouldBeServerGrulJs",{},smalltalk.LegacyPackageHandlerTest)})},
+messageSends: ["assert:equals:", "commitPathJs"]}),
+smalltalk.LegacyPackageHandlerTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "testGrulCommitPathStShouldBeGrulSt",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self._assert_equals_(_st(self["@grulPackage"])._commitPathSt(),"grul/st");
+return self}, function($ctx1) {$ctx1.fill(self,"testGrulCommitPathStShouldBeGrulSt",{},smalltalk.LegacyPackageHandlerTest)})},
+messageSends: ["assert:equals:", "commitPathSt"]}),
+smalltalk.LegacyPackageHandlerTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "testZorkCommitPathJsShouldBeJs",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self._assert_equals_(_st(self["@zorkPackage"])._commitPathJs(),"js");
+return self}, function($ctx1) {$ctx1.fill(self,"testZorkCommitPathJsShouldBeJs",{},smalltalk.LegacyPackageHandlerTest)})},
+messageSends: ["assert:equals:", "commitPathJs"]}),
+smalltalk.LegacyPackageHandlerTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "testZorkCommitPathStShouldBeSt",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self._assert_equals_(_st(self["@zorkPackage"])._commitPathSt(),"st");
+return self}, function($ctx1) {$ctx1.fill(self,"testZorkCommitPathStShouldBeSt",{},smalltalk.LegacyPackageHandlerTest)})},
+messageSends: ["assert:equals:", "commitPathSt"]}),
+smalltalk.LegacyPackageHandlerTest);
+
+
+
+smalltalk.addClass('LegacyPackageHandlerTestWithDefaultsChanged', smalltalk.LegacyPackageHandlerTest, [], 'Kernel-Tests');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "setUp",
+fn: function (){
+var self=this;
+function $LegacyPackageHandler(){return smalltalk.LegacyPackageHandler||(typeof LegacyPackageHandler=="undefined"?nil:LegacyPackageHandler)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+smalltalk.LegacyPackageHandlerTestWithDefaultsChanged.superclass.fn.prototype._setUp.apply(_st(self), []);
+$1=$LegacyPackageHandler();
+_st($1)._defaultCommitPathJs_("javascripts/");
+$2=_st($1)._defaultCommitPathSt_("smalltalk/");
+return self}, function($ctx1) {$ctx1.fill(self,"setUp",{},smalltalk.LegacyPackageHandlerTestWithDefaultsChanged)})},
+messageSends: ["setUp", "defaultCommitPathJs:", "defaultCommitPathSt:"]}),
+smalltalk.LegacyPackageHandlerTestWithDefaultsChanged);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "testGrulCommitPathJsShouldBeServerGrulJs",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self._assert_equals_(_st(self["@grulPackage"])._commitPathJs(),"server/grul/js");
+return self}, function($ctx1) {$ctx1.fill(self,"testGrulCommitPathJsShouldBeServerGrulJs",{},smalltalk.LegacyPackageHandlerTestWithDefaultsChanged)})},
+messageSends: ["assert:equals:", "commitPathJs"]}),
+smalltalk.LegacyPackageHandlerTestWithDefaultsChanged);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "testGrulCommitPathStShouldBeGrulSt",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self._assert_equals_(_st(self["@grulPackage"])._commitPathSt(),"grul/st");
+return self}, function($ctx1) {$ctx1.fill(self,"testGrulCommitPathStShouldBeGrulSt",{},smalltalk.LegacyPackageHandlerTestWithDefaultsChanged)})},
+messageSends: ["assert:equals:", "commitPathSt"]}),
+smalltalk.LegacyPackageHandlerTestWithDefaultsChanged);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "testZorkCommitPathJsShouldBeJavascript",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self._assert_equals_(_st(self["@zorkPackage"])._commitPathJs(),"javascripts/");
+return self}, function($ctx1) {$ctx1.fill(self,"testZorkCommitPathJsShouldBeJavascript",{},smalltalk.LegacyPackageHandlerTestWithDefaultsChanged)})},
+messageSends: ["assert:equals:", "commitPathJs"]}),
+smalltalk.LegacyPackageHandlerTestWithDefaultsChanged);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "testZorkCommitPathStShouldBeSmalltalk",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self._assert_equals_(_st(self["@zorkPackage"])._commitPathSt(),"smalltalk/");
+return self}, function($ctx1) {$ctx1.fill(self,"testZorkCommitPathStShouldBeSmalltalk",{},smalltalk.LegacyPackageHandlerTestWithDefaultsChanged)})},
+messageSends: ["assert:equals:", "commitPathSt"]}),
+smalltalk.LegacyPackageHandlerTestWithDefaultsChanged);
+
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "shouldInheritSelectors",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return false;
+}, function($ctx1) {$ctx1.fill(self,"shouldInheritSelectors",{},smalltalk.LegacyPackageHandlerTestWithDefaultsChanged.klass)})},
+messageSends: []}),
+smalltalk.LegacyPackageHandlerTestWithDefaultsChanged.klass);
+
+
 smalltalk.addClass('MessageSendTest', smalltalk.TestCase, [], 'Kernel-Tests');
 smalltalk.addMethod(
 smalltalk.method({
@@ -2331,6 +2491,343 @@ smalltalk.MessageSendTest);
 
 
 
+smalltalk.addClass('MethodInheritanceTest', smalltalk.TestCase, ['receiverTop', 'receiverMiddle', 'receiverBottom', 'method', 'performBlock'], 'Kernel-Tests');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "codeGeneratorClass",
+fn: function (){
+var self=this;
+function $CodeGenerator(){return smalltalk.CodeGenerator||(typeof CodeGenerator=="undefined"?nil:CodeGenerator)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=$CodeGenerator();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"codeGeneratorClass",{},smalltalk.MethodInheritanceTest)})},
+messageSends: []}),
+smalltalk.MethodInheritanceTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "compiler",
+fn: function (){
+var self=this;
+function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
+return smalltalk.withContext(function($ctx1) { 
+var $2,$3,$1;
+$2=_st($Compiler())._new();
+_st($2)._codeGeneratorClass_(self._codeGeneratorClass());
+$3=_st($2)._yourself();
+$1=$3;
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"compiler",{},smalltalk.MethodInheritanceTest)})},
+messageSends: ["codeGeneratorClass:", "new", "codeGeneratorClass", "yourself"]}),
+smalltalk.MethodInheritanceTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "deinstallBottom",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(self._targetClassBottom())._removeCompiledMethod_(self["@method"]);
+return self}, function($ctx1) {$ctx1.fill(self,"deinstallBottom",{},smalltalk.MethodInheritanceTest)})},
+messageSends: ["removeCompiledMethod:", "targetClassBottom"]}),
+smalltalk.MethodInheritanceTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "deinstallMiddle",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(self._targetClassMiddle())._removeCompiledMethod_(self["@method"]);
+return self}, function($ctx1) {$ctx1.fill(self,"deinstallMiddle",{},smalltalk.MethodInheritanceTest)})},
+messageSends: ["removeCompiledMethod:", "targetClassMiddle"]}),
+smalltalk.MethodInheritanceTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "deinstallTop",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(self._targetClassTop())._removeCompiledMethod_(self["@method"]);
+return self}, function($ctx1) {$ctx1.fill(self,"deinstallTop",{},smalltalk.MethodInheritanceTest)})},
+messageSends: ["removeCompiledMethod:", "targetClassTop"]}),
+smalltalk.MethodInheritanceTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "installBottom:",
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self["@method"]=_st(self._compiler())._install_forClass_category_(aString,self._targetClassBottom(),"tests");
+return self}, function($ctx1) {$ctx1.fill(self,"installBottom:",{aString:aString},smalltalk.MethodInheritanceTest)})},
+messageSends: ["install:forClass:category:", "compiler", "targetClassBottom"]}),
+smalltalk.MethodInheritanceTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "installMiddle:",
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self["@method"]=_st(self._compiler())._install_forClass_category_(aString,self._targetClassMiddle(),"tests");
+return self}, function($ctx1) {$ctx1.fill(self,"installMiddle:",{aString:aString},smalltalk.MethodInheritanceTest)})},
+messageSends: ["install:forClass:category:", "compiler", "targetClassMiddle"]}),
+smalltalk.MethodInheritanceTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "installTop:",
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self["@method"]=_st(self._compiler())._install_forClass_category_(aString,self._targetClassTop(),"tests");
+return self}, function($ctx1) {$ctx1.fill(self,"installTop:",{aString:aString},smalltalk.MethodInheritanceTest)})},
+messageSends: ["install:forClass:category:", "compiler", "targetClassTop"]}),
+smalltalk.MethodInheritanceTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "setUp",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self["@receiverTop"]=_st(self._targetClassTop())._new();
+self["@receiverMiddle"]=_st(self._targetClassMiddle())._new();
+self["@receiverBottom"]=_st(self._targetClassBottom())._new();
+self["@method"]=nil;
+self["@performBlock"]=(function(){
+return smalltalk.withContext(function($ctx2) {
+return self._error_("performBlock not initialized");
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})});
+return self}, function($ctx1) {$ctx1.fill(self,"setUp",{},smalltalk.MethodInheritanceTest)})},
+messageSends: ["new", "targetClassTop", "targetClassMiddle", "targetClassBottom", "error:"]}),
+smalltalk.MethodInheritanceTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "shouldMNU",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self._shouldMNUTop();
+self._shouldMNUMiddle();
+self._shouldMNUBottom();
+return self}, function($ctx1) {$ctx1.fill(self,"shouldMNU",{},smalltalk.MethodInheritanceTest)})},
+messageSends: ["shouldMNUTop", "shouldMNUMiddle", "shouldMNUBottom"]}),
+smalltalk.MethodInheritanceTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "shouldMNUBottom",
+fn: function (){
+var self=this;
+function $MessageNotUnderstood(){return smalltalk.MessageNotUnderstood||(typeof MessageNotUnderstood=="undefined"?nil:MessageNotUnderstood)}
+return smalltalk.withContext(function($ctx1) { 
+self._should_raise_((function(){
+return smalltalk.withContext(function($ctx2) {
+return _st(self["@performBlock"])._value_(self["@receiverBottom"]);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),$MessageNotUnderstood());
+return self}, function($ctx1) {$ctx1.fill(self,"shouldMNUBottom",{},smalltalk.MethodInheritanceTest)})},
+messageSends: ["should:raise:", "value:"]}),
+smalltalk.MethodInheritanceTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "shouldMNUMiddle",
+fn: function (){
+var self=this;
+function $MessageNotUnderstood(){return smalltalk.MessageNotUnderstood||(typeof MessageNotUnderstood=="undefined"?nil:MessageNotUnderstood)}
+return smalltalk.withContext(function($ctx1) { 
+self._should_raise_((function(){
+return smalltalk.withContext(function($ctx2) {
+return _st(self["@performBlock"])._value_(self["@receiverMiddle"]);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),$MessageNotUnderstood());
+return self}, function($ctx1) {$ctx1.fill(self,"shouldMNUMiddle",{},smalltalk.MethodInheritanceTest)})},
+messageSends: ["should:raise:", "value:"]}),
+smalltalk.MethodInheritanceTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "shouldMNUTop",
+fn: function (){
+var self=this;
+function $MessageNotUnderstood(){return smalltalk.MessageNotUnderstood||(typeof MessageNotUnderstood=="undefined"?nil:MessageNotUnderstood)}
+return smalltalk.withContext(function($ctx1) { 
+self._should_raise_((function(){
+return smalltalk.withContext(function($ctx2) {
+return _st(self["@performBlock"])._value_(self["@receiverTop"]);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),$MessageNotUnderstood());
+return self}, function($ctx1) {$ctx1.fill(self,"shouldMNUTop",{},smalltalk.MethodInheritanceTest)})},
+messageSends: ["should:raise:", "value:"]}),
+smalltalk.MethodInheritanceTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "shouldReturn:",
+fn: function (anObject){
+var self=this;
+var result;
+return smalltalk.withContext(function($ctx1) { 
+result=_st(self["@performBlock"])._value_(self["@receiverTop"]);
+self._assert_equals_(["top",anObject],["top",result]);
+result=_st(self["@performBlock"])._value_(self["@receiverMiddle"]);
+self._assert_equals_(["middle",anObject],["middle",result]);
+result=_st(self["@performBlock"])._value_(self["@receiverBottom"]);
+self._assert_equals_(["bottom",anObject],["bottom",result]);
+return self}, function($ctx1) {$ctx1.fill(self,"shouldReturn:",{anObject:anObject,result:result},smalltalk.MethodInheritanceTest)})},
+messageSends: ["value:", "assert:equals:"]}),
+smalltalk.MethodInheritanceTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "shouldReturn:and:and:",
+fn: function (anObject,anObject2,anObject3){
+var self=this;
+var result;
+return smalltalk.withContext(function($ctx1) { 
+result=_st(self["@performBlock"])._value_(self["@receiverTop"]);
+self._assert_equals_(["top",anObject],["top",result]);
+result=_st(self["@performBlock"])._value_(self["@receiverMiddle"]);
+self._assert_equals_(["middle",anObject2],["middle",result]);
+result=_st(self["@performBlock"])._value_(self["@receiverBottom"]);
+self._assert_equals_(["bottom",anObject3],["bottom",result]);
+return self}, function($ctx1) {$ctx1.fill(self,"shouldReturn:and:and:",{anObject:anObject,anObject2:anObject2,anObject3:anObject3,result:result},smalltalk.MethodInheritanceTest)})},
+messageSends: ["value:", "assert:equals:"]}),
+smalltalk.MethodInheritanceTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "targetClassBottom",
+fn: function (){
+var self=this;
+function $JavaScriptException(){return smalltalk.JavaScriptException||(typeof JavaScriptException=="undefined"?nil:JavaScriptException)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=$JavaScriptException();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"targetClassBottom",{},smalltalk.MethodInheritanceTest)})},
+messageSends: []}),
+smalltalk.MethodInheritanceTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "targetClassMiddle",
+fn: function (){
+var self=this;
+function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=$Error();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"targetClassMiddle",{},smalltalk.MethodInheritanceTest)})},
+messageSends: []}),
+smalltalk.MethodInheritanceTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "targetClassTop",
+fn: function (){
+var self=this;
+function $Object(){return smalltalk.Object||(typeof Object=="undefined"?nil:Object)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=$Object();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"targetClassTop",{},smalltalk.MethodInheritanceTest)})},
+messageSends: []}),
+smalltalk.MethodInheritanceTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "tearDown",
+fn: function (){
+var self=this;
+function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
+return smalltalk.withContext(function($ctx1) { 
+_st((function(){
+return smalltalk.withContext(function($ctx2) {
+return self._deinstallTop();
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._on_do_($Error(),(function(){
+return smalltalk.withContext(function($ctx2) {
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
+_st((function(){
+return smalltalk.withContext(function($ctx2) {
+return self._deinstallMiddle();
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}))._on_do_($Error(),(function(){
+return smalltalk.withContext(function($ctx2) {
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
+_st((function(){
+return smalltalk.withContext(function($ctx2) {
+return self._deinstallBottom();
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)})}))._on_do_($Error(),(function(){
+return smalltalk.withContext(function($ctx2) {
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"tearDown",{},smalltalk.MethodInheritanceTest)})},
+messageSends: ["on:do:", "deinstallTop", "deinstallMiddle", "deinstallBottom"]}),
+smalltalk.MethodInheritanceTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "testMNU11",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self["@performBlock"]=(function(x){
+return smalltalk.withContext(function($ctx2) {
+return _st(x)._foo();
+}, function($ctx2) {$ctx2.fillBlock({x:x},$ctx1,1)})});
+self._shouldMNU();
+self._installTop_("foo ^ false");
+self._installTop_("foo ^ true");
+self._deinstallTop();
+self._shouldMNU();
+return self}, function($ctx1) {$ctx1.fill(self,"testMNU11",{},smalltalk.MethodInheritanceTest)})},
+messageSends: ["foo", "shouldMNU", "installTop:", "deinstallTop"]}),
+smalltalk.MethodInheritanceTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "testMNU22",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self["@performBlock"]=(function(x){
+return smalltalk.withContext(function($ctx2) {
+return _st(x)._foo();
+}, function($ctx2) {$ctx2.fillBlock({x:x},$ctx1,1)})});
+self._shouldMNU();
+self._installMiddle_("foo ^ false");
+self._installMiddle_("foo ^ true");
+self._deinstallMiddle();
+self._shouldMNU();
+return self}, function($ctx1) {$ctx1.fill(self,"testMNU22",{},smalltalk.MethodInheritanceTest)})},
+messageSends: ["foo", "shouldMNU", "installMiddle:", "deinstallMiddle"]}),
+smalltalk.MethodInheritanceTest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "testReturns1",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self["@performBlock"]=(function(x){
+return smalltalk.withContext(function($ctx2) {
+return _st(x)._foo();
+}, function($ctx2) {$ctx2.fillBlock({x:x},$ctx1,1)})});
+self._installTop_("foo ^ false");
+self._shouldReturn_(false);
+self._installTop_("foo ^ true");
+self._shouldReturn_(true);
+return self}, function($ctx1) {$ctx1.fill(self,"testReturns1",{},smalltalk.MethodInheritanceTest)})},
+messageSends: ["foo", "installTop:", "shouldReturn:"]}),
+smalltalk.MethodInheritanceTest);
+
+
+
 smalltalk.addClass('NumberTest', smalltalk.TestCase, [], 'Kernel-Tests');
 smalltalk.addMethod(
 smalltalk.method({
@@ -2796,39 +3293,6 @@ smalltalk.ObjectMock);
 
 
 
-smalltalk.addClass('ObjectMock2', smalltalk.ObjectMock, [], 'Kernel-Tests');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "foo",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self["@foo"];
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"foo",{},smalltalk.ObjectMock2)})},
-messageSends: []}),
-smalltalk.ObjectMock2);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "foo:",
-fn: function (anObject){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self["@foo"]=anObject;
-return self}, function($ctx1) {$ctx1.fill(self,"foo:",{anObject:anObject},smalltalk.ObjectMock2)})},
-messageSends: []}),
-smalltalk.ObjectMock2);
-
-
-
-smalltalk.addClass('ObjectMock3', smalltalk.ObjectMock2, [], 'Kernel-Tests');
-
-
-smalltalk.addClass('ObjectMock4', smalltalk.ObjectMock3, [], 'Kernel-Tests');
-
-
 smalltalk.addClass('ObjectTest', smalltalk.TestCase, [], 'Kernel-Tests');
 smalltalk.addMethod(
 smalltalk.method({
@@ -3052,164 +3516,6 @@ smalltalk.ObjectTest);
 
 
 
-smalltalk.addClass('PackageTest', smalltalk.TestCase, ['zorkPackage', 'grulPackage', 'backUpCommitPathJs', 'backUpCommitPathSt'], 'Kernel-Tests');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "setUp",
-fn: function (){
-var self=this;
-function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
-return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-self["@backUpCommitPathJs"]=_st($Package())._defaultCommitPathJs();
-self["@backUpCommitPathSt"]=_st($Package())._defaultCommitPathSt();
-_st($Package())._resetCommitPaths();
-self["@zorkPackage"]=_st(_st($Package())._new())._name_("Zork");
-$1=_st($Package())._new();
-_st($1)._name_("Grul");
-_st($1)._commitPathJs_("server/grul/js");
-_st($1)._commitPathSt_("grul/st");
-$2=_st($1)._yourself();
-self["@grulPackage"]=$2;
-return self}, function($ctx1) {$ctx1.fill(self,"setUp",{},smalltalk.PackageTest)})},
-messageSends: ["defaultCommitPathJs", "defaultCommitPathSt", "resetCommitPaths", "name:", "new", "commitPathJs:", "commitPathSt:", "yourself"]}),
-smalltalk.PackageTest);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "tearDown",
-fn: function (){
-var self=this;
-function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
-return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=$Package();
-_st($1)._defaultCommitPathJs_(self["@backUpCommitPathJs"]);
-$2=_st($1)._defaultCommitPathSt_(self["@backUpCommitPathSt"]);
-return self}, function($ctx1) {$ctx1.fill(self,"tearDown",{},smalltalk.PackageTest)})},
-messageSends: ["defaultCommitPathJs:", "defaultCommitPathSt:"]}),
-smalltalk.PackageTest);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "testGrulCommitPathJsShouldBeServerGrulJs",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self._assert_equals_(_st(self["@grulPackage"])._commitPathJs(),"server/grul/js");
-return self}, function($ctx1) {$ctx1.fill(self,"testGrulCommitPathJsShouldBeServerGrulJs",{},smalltalk.PackageTest)})},
-messageSends: ["assert:equals:", "commitPathJs"]}),
-smalltalk.PackageTest);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "testGrulCommitPathStShouldBeGrulSt",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self._assert_equals_(_st(self["@grulPackage"])._commitPathSt(),"grul/st");
-return self}, function($ctx1) {$ctx1.fill(self,"testGrulCommitPathStShouldBeGrulSt",{},smalltalk.PackageTest)})},
-messageSends: ["assert:equals:", "commitPathSt"]}),
-smalltalk.PackageTest);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "testZorkCommitPathJsShouldBeJs",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self._assert_equals_(_st(self["@zorkPackage"])._commitPathJs(),"js");
-return self}, function($ctx1) {$ctx1.fill(self,"testZorkCommitPathJsShouldBeJs",{},smalltalk.PackageTest)})},
-messageSends: ["assert:equals:", "commitPathJs"]}),
-smalltalk.PackageTest);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "testZorkCommitPathStShouldBeSt",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self._assert_equals_(_st(self["@zorkPackage"])._commitPathSt(),"st");
-return self}, function($ctx1) {$ctx1.fill(self,"testZorkCommitPathStShouldBeSt",{},smalltalk.PackageTest)})},
-messageSends: ["assert:equals:", "commitPathSt"]}),
-smalltalk.PackageTest);
-
-
-
-smalltalk.addClass('PackageWithDefaultCommitPathChangedTest', smalltalk.PackageTest, [], 'Kernel-Tests');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "setUp",
-fn: function (){
-var self=this;
-function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
-return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-smalltalk.PackageWithDefaultCommitPathChangedTest.superclass.fn.prototype._setUp.apply(_st(self), []);
-$1=$Package();
-_st($1)._defaultCommitPathJs_("javascripts/");
-$2=_st($1)._defaultCommitPathSt_("smalltalk/");
-return self}, function($ctx1) {$ctx1.fill(self,"setUp",{},smalltalk.PackageWithDefaultCommitPathChangedTest)})},
-messageSends: ["setUp", "defaultCommitPathJs:", "defaultCommitPathSt:"]}),
-smalltalk.PackageWithDefaultCommitPathChangedTest);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "testGrulCommitPathJsShouldBeServerGrulJs",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self._assert_equals_(_st(self["@grulPackage"])._commitPathJs(),"server/grul/js");
-return self}, function($ctx1) {$ctx1.fill(self,"testGrulCommitPathJsShouldBeServerGrulJs",{},smalltalk.PackageWithDefaultCommitPathChangedTest)})},
-messageSends: ["assert:equals:", "commitPathJs"]}),
-smalltalk.PackageWithDefaultCommitPathChangedTest);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "testGrulCommitPathStShouldBeGrulSt",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self._assert_equals_(_st(self["@grulPackage"])._commitPathSt(),"grul/st");
-return self}, function($ctx1) {$ctx1.fill(self,"testGrulCommitPathStShouldBeGrulSt",{},smalltalk.PackageWithDefaultCommitPathChangedTest)})},
-messageSends: ["assert:equals:", "commitPathSt"]}),
-smalltalk.PackageWithDefaultCommitPathChangedTest);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "testZorkCommitPathJsShouldBeJavascript",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self._assert_equals_(_st(self["@zorkPackage"])._commitPathJs(),"javascripts/");
-return self}, function($ctx1) {$ctx1.fill(self,"testZorkCommitPathJsShouldBeJavascript",{},smalltalk.PackageWithDefaultCommitPathChangedTest)})},
-messageSends: ["assert:equals:", "commitPathJs"]}),
-smalltalk.PackageWithDefaultCommitPathChangedTest);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "testZorkCommitPathStShouldBeSmalltalk",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self._assert_equals_(_st(self["@zorkPackage"])._commitPathSt(),"smalltalk/");
-return self}, function($ctx1) {$ctx1.fill(self,"testZorkCommitPathStShouldBeSmalltalk",{},smalltalk.PackageWithDefaultCommitPathChangedTest)})},
-messageSends: ["assert:equals:", "commitPathSt"]}),
-smalltalk.PackageWithDefaultCommitPathChangedTest);
-
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "shouldInheritSelectors",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return false;
-}, function($ctx1) {$ctx1.fill(self,"shouldInheritSelectors",{},smalltalk.PackageWithDefaultCommitPathChangedTest.klass)})},
-messageSends: []}),
-smalltalk.PackageWithDefaultCommitPathChangedTest.klass);
-
-
 smalltalk.addClass('PointTest', smalltalk.TestCase, [], 'Kernel-Tests');
 smalltalk.addMethod(
 smalltalk.method({
@@ -3788,5 +4094,4 @@ messageSends: ["assert:", "isNil", "deny:", "notNil"]}),
 smalltalk.UndefinedTest);
 
 
-
 })(global_smalltalk,global_nil,global__st);

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 732 - 327
js/Kernel-Tests.js


+ 1 - 1
js/Kernel-Transcript.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Kernel-Transcript');
+
 smalltalk.addClass('ConsoleTranscript', smalltalk.Object, ['textarea'], 'Kernel-Transcript');
 smalltalk.addMethod(
 smalltalk.method({
@@ -150,5 +151,4 @@ return self}, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},small
 messageSends: ["show:", "current"]}),
 smalltalk.Transcript.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/Kernel-Transcript.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Kernel-Transcript');
+
 smalltalk.addClass('ConsoleTranscript', smalltalk.Object, ['textarea'], 'Kernel-Transcript');
 smalltalk.ConsoleTranscript.comment="I am a specific transcript emitting to the JavaScript console.\x0a\x0aIf no other transcript is registered, I am the default.";
 smalltalk.addMethod(
@@ -217,5 +218,4 @@ referencedClasses: []
 }),
 smalltalk.Transcript.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/SUnit-Tests.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('SUnit-Tests');
+
 smalltalk.addClass('ExampleSetTest', smalltalk.TestCase, ['empty', 'full'], 'SUnit-Tests');
 smalltalk.addMethod(
 smalltalk.method({
@@ -427,5 +428,4 @@ messageSends: ["timeout:", "valueWithTimeout:", "async:", "finished", "+", "asse
 smalltalk.SUnitAsyncTest);
 
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/SUnit-Tests.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('SUnit-Tests');
+
 smalltalk.addClass('ExampleSetTest', smalltalk.TestCase, ['empty', 'full'], 'SUnit-Tests');
 smalltalk.ExampleSetTest.comment="ExampleSetTest is taken from Pharo 1.4.\x0a\x0aTHe purpose of this class is to demonstrate a simple use case of the test framework.";
 smalltalk.addMethod(
@@ -543,5 +544,4 @@ referencedClasses: []
 smalltalk.SUnitAsyncTest);
 
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/SUnit.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('SUnit');
+
 smalltalk.addClass('ResultAnnouncement', smalltalk.Object, ['result'], 'SUnit');
 smalltalk.addMethod(
 smalltalk.method({
@@ -921,5 +922,4 @@ return $1;
 messageSends: ["suite:", "new"]}),
 smalltalk.TestSuiteRunner.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
js/SUnit.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('SUnit');
+
 smalltalk.addClass('ResultAnnouncement', smalltalk.Object, ['result'], 'SUnit');
 smalltalk.ResultAnnouncement.comment="I get signaled when a `TestCase` has been run.\x0a\x0aMy instances hold the result (instance of `TestResult`) of the test run.";
 smalltalk.addMethod(
@@ -1233,5 +1234,4 @@ referencedClasses: []
 }),
 smalltalk.TestSuiteRunner.klass);
 
-
 })(global_smalltalk,global_nil,global__st);

+ 8 - 8
js/Spaces.deploy.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Spaces');
+
 smalltalk.addClass('ObjectSpace', smalltalk.Object, ['frame'], 'Spaces');
 smalltalk.addMethod(
 smalltalk.method({
@@ -19,11 +20,11 @@ selector: "create",
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(window)._jQuery_("body"))._append_("<iframe style=\x22display: none;\x22></iframe>");
-self["@frame"]=_st(_st(_st(window)._jQuery_("iframe"))._get())._last();
+_st("body"._asJQuery())._append_("<iframe style=\x22display: none;\x22></iframe>");
+self["@frame"]=_st(_st("iframe"._asJQuery())._get())._last();
 _st(_st(self["@frame"])._contentWindow())._location_(_st(window)._location());
 return self}, function($ctx1) {$ctx1.fill(self,"create",{},smalltalk.ObjectSpace)})},
-messageSends: ["append:", "jQuery:", "last", "get", "location:", "contentWindow", "location"]}),
+messageSends: ["append:", "asJQuery", "last", "get", "location:", "contentWindow", "location"]}),
 smalltalk.ObjectSpace);
 
 smalltalk.addMethod(
@@ -40,10 +41,10 @@ return $2;
 } else {
 $1;
 };
-_st(_st(window)._jQuery_(self["@frame"]))._remove();
+_st(_st(self["@frame"])._asJQuery())._remove();
 self._release();
 return self}, function($ctx1) {$ctx1.fill(self,"destroy",{},smalltalk.ObjectSpace)})},
-messageSends: ["ifNil:", "remove", "jQuery:", "release"]}),
+messageSends: ["ifNil:", "remove", "asJQuery", "release"]}),
 smalltalk.ObjectSpace);
 
 smalltalk.addMethod(
@@ -120,9 +121,9 @@ selector: "whenReadyDo:",
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(window)._jQuery_(self["@frame"]))._bind_do_("load",aBlock);
+_st(_st(self["@frame"])._asJQuery())._bind_do_("load",aBlock);
 return self}, function($ctx1) {$ctx1.fill(self,"whenReadyDo:",{aBlock:aBlock},smalltalk.ObjectSpace)})},
-messageSends: ["bind:do:", "jQuery:"]}),
+messageSends: ["bind:do:", "asJQuery"]}),
 smalltalk.ObjectSpace);
 
 
@@ -249,5 +250,4 @@ messageSends: ["deny:", "isNil", "frame", "release", "assert:"]}),
 smalltalk.ObjectSpaceTest);
 
 
-
 })(global_smalltalk,global_nil,global__st);

+ 11 - 11
js/Spaces.js

@@ -1,5 +1,6 @@
 (function(smalltalk,nil,_st){
 smalltalk.addPackage('Spaces');
+
 smalltalk.addClass('ObjectSpace', smalltalk.Object, ['frame'], 'Spaces');
 smalltalk.ObjectSpace.comment="I am a connection to another Smalltalk environment.\x0aThe implementation creates an iframe on the same location as the window, and connect to the Amber environment.\x0a\x0a\x0a\x0a## Usage example:\x0a\x0a\x09| space |\x0a\x09\x0a\x09space := ObjectSpace new.\x0a\x09space do: [ smalltalk ] \x22Answers aSmalltalk\x22\x0a\x09(space do: [ smalltalk ]) == smalltalk \x22Answers false\x22\x0a\x09\x0a\x09space release \x22Remove the object space environment\x22";
 smalltalk.addMethod(
@@ -26,13 +27,13 @@ category: 'initialization',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(window)._jQuery_("body"))._append_("<iframe style=\x22display: none;\x22></iframe>");
-self["@frame"]=_st(_st(_st(window)._jQuery_("iframe"))._get())._last();
+_st("body"._asJQuery())._append_("<iframe style=\x22display: none;\x22></iframe>");
+self["@frame"]=_st(_st("iframe"._asJQuery())._get())._last();
 _st(_st(self["@frame"])._contentWindow())._location_(_st(window)._location());
 return self}, function($ctx1) {$ctx1.fill(self,"create",{},smalltalk.ObjectSpace)})},
 args: [],
-source: "create\x0a\x09(window jQuery: 'body') append: '<iframe style=\x22display: none;\x22></iframe>'.\x0a\x09frame := (window jQuery: 'iframe') get last.\x0a\x09frame contentWindow location: window location",
-messageSends: ["append:", "jQuery:", "last", "get", "location:", "contentWindow", "location"],
+source: "create\x0a\x09'body' asJQuery append: '<iframe style=\x22display: none;\x22></iframe>'.\x0a\x09frame := 'iframe' asJQuery get last.\x0a\x09frame contentWindow location: window location",
+messageSends: ["append:", "asJQuery", "last", "get", "location:", "contentWindow", "location"],
 referencedClasses: []
 }),
 smalltalk.ObjectSpace);
@@ -52,12 +53,12 @@ return $2;
 } else {
 $1;
 };
-_st(_st(window)._jQuery_(self["@frame"]))._remove();
+_st(_st(self["@frame"])._asJQuery())._remove();
 self._release();
 return self}, function($ctx1) {$ctx1.fill(self,"destroy",{},smalltalk.ObjectSpace)})},
 args: [],
-source: "destroy\x0a\x09frame ifNil: [ ^ self ].\x0a\x09(window jQuery: frame) remove.\x0a\x0a\x09self release",
-messageSends: ["ifNil:", "remove", "jQuery:", "release"],
+source: "destroy\x0a\x09frame ifNil: [ ^ self ].\x0a\x09frame asJQuery remove.\x0a\x0a\x09self release",
+messageSends: ["ifNil:", "remove", "asJQuery", "release"],
 referencedClasses: []
 }),
 smalltalk.ObjectSpace);
@@ -162,11 +163,11 @@ category: 'events',
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(window)._jQuery_(self["@frame"]))._bind_do_("load",aBlock);
+_st(_st(self["@frame"])._asJQuery())._bind_do_("load",aBlock);
 return self}, function($ctx1) {$ctx1.fill(self,"whenReadyDo:",{aBlock:aBlock},smalltalk.ObjectSpace)})},
 args: ["aBlock"],
-source: "whenReadyDo: aBlock\x0a\x09(window jQuery: frame)\x0a\x09\x09bind: 'load'\x0a\x09\x09do: aBlock",
-messageSends: ["bind:do:", "jQuery:"],
+source: "whenReadyDo: aBlock\x0a\x09frame asJQuery\x0a\x09\x09bind: 'load'\x0a\x09\x09do: aBlock",
+messageSends: ["bind:do:", "asJQuery"],
 referencedClasses: []
 }),
 smalltalk.ObjectSpace);
@@ -335,5 +336,4 @@ referencedClasses: []
 smalltalk.ObjectSpaceTest);
 
 
-
 })(global_smalltalk,global_nil,global__st);

+ 1 - 1
package.json

@@ -25,7 +25,7 @@
         "ambers": "./bin/server"
     },
     "scripts": {
-        "test": "sh -c 'grunt amberc:amber_test_runner' && node ./test/amber_test_runner.js"
+        "test": "grunt amberc:amber_test_runner && node ./test/amber_test_runner.js"
     },
     "devDependencies": {
         "pegjs": "~0.7.0",

+ 46 - 2
st/Canvas.st

@@ -1,4 +1,48 @@
 Smalltalk current createPackage: 'Canvas'!
+Object subclass: #BrowserInterface
+	instanceVariableNames: ''
+	package: 'Canvas'!
+!BrowserInterface commentStamp!
+I am platform interface class that tries to use window and jQuery; that is, one for browser environment.
+
+## API
+
+    self isAvailable. "true if window and jQuery exist".
+
+    self alert: 'Hey, there is a problem'.
+    self confirm: 'Affirmative?'.
+    self prompt: 'Your name:'.
+
+    self ajax: #{
+        'url' -> '/patch.js'. 'type' -> 'GET'. dataType->'script'
+    }.!
+
+!BrowserInterface methodsFor: 'actions'!
+
+ajax: anObject
+	^jQuery ajax: anObject
+!
+
+alert: aString
+	^window alert: aString
+!
+
+confirm: aString
+	^window confirm: aString
+!
+
+prompt: aString
+	^window prompt: aString
+! !
+
+!BrowserInterface methodsFor: 'testing'!
+
+isAvailable
+<return typeof window !!== "undefined" && typeof jQuery !!== "undefined">
+! !
+
+BrowserInterface class instanceVariableNames: 'uiWorker ajaxWorker'!
+
 Object subclass: #HTMLCanvas
 	instanceVariableNames: 'root'
 	package: 'Canvas'!
@@ -887,7 +931,7 @@ width: aString
 !TagBrush methodsFor: 'converting'!
 
 asJQuery
-	^window jQuery: self element
+	^self element asJQuery
 ! !
 
 !TagBrush methodsFor: 'events'!
@@ -1038,7 +1082,7 @@ canvas: aCanvas
 	yourself
 ! !
 
-Object subclass: #Widget
+InterfacingObject subclass: #Widget
 	instanceVariableNames: ''
 	package: 'Canvas'!
 !Widget commentStamp!

+ 0 - 490
st/Helios-Commands.st

@@ -1,490 +0,0 @@
-Smalltalk current createPackage: 'Helios-Commands'!
-Object subclass: #HLCommand
- instanceVariableNames: ''
- package: 'Helios-Commands'!
-
-!HLCommand methodsFor: 'accessing'!
-
-documentation
-	^ self class documentation
-!
-
-key
-	^ self class key
-!
-
-label
-	^ self class label
-! !
-
-!HLCommand methodsFor: 'converting'!
-
-asActionBinding
-	^ (HLBindingAction on: self key labelled: self label)
-    	callback: [ self execute ]
-!
-
-asBinding
-	^ self isBindingGroup
-		ifTrue: [ self asGroupBinding ]
-		ifFalse: [ self asActionBinding ]
-!
-
-asGroupBinding
-	^ HLBindingGroup 
-		on: self key 
-		labelled: self label
-! !
-
-!HLCommand methodsFor: 'executing'!
-
-execute
-! !
-
-!HLCommand methodsFor: 'registration'!
-
-registerOn: aBinding
-	^ aBinding add: self asBinding
-! !
-
-!HLCommand methodsFor: 'testing'!
-
-isBindingGroup
-	^ (self class methodDictionary includesKey: 'execute') not
-! !
-
-!HLCommand class methodsFor: 'accessing'!
-
-concreteSubclasses
-	^ self subclasses select: [ :each |
-		each isConcrete ]
-!
-
-documentation
-	^ ''
-!
-
-key
-	^ nil
-!
-
-label
-	^ ''
-! !
-
-!HLCommand class methodsFor: 'registration'!
-
-registerConcreteClassesOn: aBinding
-	self concreteSubclasses do: [ :each | | binding |
-		binding := each registerOn: aBinding.
-		binding isBindingGroup ifTrue: [
-			each registerConcreteClassesOn: binding ] ]
-!
-
-registerOn: aBinding
-	^ self new registerOn: aBinding
-! !
-
-!HLCommand class methodsFor: 'testing'!
-
-isConcrete
-	^ self key notNil
-! !
-
-HLCommand subclass: #HLCloseTabCommand
- instanceVariableNames: ''
- package: 'Helios-Commands'!
-
-!HLCloseTabCommand methodsFor: 'executing'!
-
-execute
-	HLManager current removeActiveTab
-! !
-
-!HLCloseTabCommand class methodsFor: 'accessing'!
-
-key
-	^ 87
-!
-
-label
-	^ 'Close tab'
-! !
-
-HLCommand subclass: #HLModelCommand
- instanceVariableNames: 'model'
- package: 'Helios-Commands'!
-
-!HLModelCommand methodsFor: 'accessing'!
-
-model
-	^ model
-!
-
-model: aModel
-	model := aModel
-! !
-
-!HLModelCommand class methodsFor: 'instance creation'!
-
-for: aModel
-	^ self new
-! !
-
-!HLModelCommand class methodsFor: 'registration'!
-
-registerConcreteClassesOn: aBinding for: aModel
-	self concreteSubclasses do: [ :each | | binding |
-		binding := each registerOn: aBinding for: aModel.
-		binding isBindingGroup ifTrue: [
-			each registerConcreteClassesOn: binding for: aModel ] ]
-!
-
-registerOn: aBinding for: aModel
-	^ (self for: aModel) registerOn: aBinding
-! !
-
-HLModelCommand subclass: #HLBrowserCommand
- instanceVariableNames: ''
- package: 'Helios-Commands'!
-
-!HLBrowserCommand class methodsFor: 'instance creation'!
-
-for: aBrowserModel
-	^ self new
-    	model: aBrowserModel;
-        yourself
-! !
-
-HLBrowserCommand subclass: #HLGoToCommand
- instanceVariableNames: ''
- package: 'Helios-Commands'!
-
-!HLGoToCommand class methodsFor: 'accessing'!
-
-key
-	^ 71
-!
-
-label
-	^ 'Go to'
-! !
-
-HLGoToCommand subclass: #HLGoToClassesCommand
- instanceVariableNames: ''
- package: 'Helios-Commands'!
-
-!HLGoToClassesCommand methodsFor: 'executing'!
-
-execute
-	self model focusOnClasses
-! !
-
-!HLGoToClassesCommand class methodsFor: 'accessing'!
-
-key
-	"c"
-    
-	^ 67
-!
-
-label
-	^ 'Classes'
-! !
-
-HLGoToCommand subclass: #HLGoToMethodsCommand
- instanceVariableNames: ''
- package: 'Helios-Commands'!
-
-!HLGoToMethodsCommand methodsFor: 'executing'!
-
-execute
-	self model focusOnMethods
-! !
-
-!HLGoToMethodsCommand class methodsFor: 'accessing'!
-
-key
-	"m"
-    
-	^ 77
-!
-
-label
-	^ 'Methods'
-! !
-
-HLGoToCommand subclass: #HLGoToPackagesCommand
- instanceVariableNames: ''
- package: 'Helios-Commands'!
-
-!HLGoToPackagesCommand methodsFor: 'executing'!
-
-execute
-	self model focusOnPackages
-! !
-
-!HLGoToPackagesCommand class methodsFor: 'accessing'!
-
-key
-	"p"
-    
-	^ 80
-!
-
-label
-	^ 'Packages'
-! !
-
-HLGoToCommand subclass: #HLGoToProtocolsCommand
- instanceVariableNames: ''
- package: 'Helios-Commands'!
-
-!HLGoToProtocolsCommand methodsFor: 'executing'!
-
-execute
-	self model focusOnProtocols
-! !
-
-!HLGoToProtocolsCommand class methodsFor: 'accessing'!
-
-key
-	"p"
-    
-	^ 84
-!
-
-label
-	^ 'Protocols'
-! !
-
-HLGoToCommand subclass: #HLGoToSourceCodeCommand
- instanceVariableNames: ''
- package: 'Helios-Commands'!
-
-!HLGoToSourceCodeCommand methodsFor: 'executing'!
-
-execute
-	self model focusOnSourceCode
-! !
-
-!HLGoToSourceCodeCommand class methodsFor: 'accessing'!
-
-key
-	"s"
-    
-	^ 83
-!
-
-label
-	^ 'Source code'
-! !
-
-HLBrowserCommand subclass: #HLMoveToCommand
- instanceVariableNames: ''
- package: 'Helios-Commands'!
-
-!HLMoveToCommand class methodsFor: 'accessing'!
-
-key
-	^ 77
-!
-
-label
-	^ 'Move'
-! !
-
-HLMoveToCommand subclass: #HLMoveMethodToCommand
- instanceVariableNames: ''
- package: 'Helios-Commands'!
-
-!HLMoveMethodToCommand class methodsFor: 'accessing'!
-
-key
-	^ 77
-!
-
-label
-	^ 'Method'
-! !
-
-HLMoveMethodToCommand subclass: #HLMoveMethodToClassCommand
- instanceVariableNames: ''
- package: 'Helios-Commands'!
-
-!HLMoveMethodToClassCommand methodsFor: 'executing'!
-
-execute
-! !
-
-!HLMoveMethodToClassCommand class methodsFor: 'accessing'!
-
-key
-	^ 67
-!
-
-label	
-	^ 'to class'
-! !
-
-HLMoveMethodToCommand subclass: #HLMoveMethodToProtocolCommand
- instanceVariableNames: ''
- package: 'Helios-Commands'!
-
-!HLMoveMethodToProtocolCommand methodsFor: 'executing'!
-
-execute
-! !
-
-!HLMoveMethodToProtocolCommand class methodsFor: 'accessing'!
-
-key
-	^ 84
-!
-
-label
-	^ 'to protocol'
-! !
-
-HLBrowserCommand subclass: #HLToggleCommand
- instanceVariableNames: ''
- package: 'Helios-Commands'!
-
-!HLToggleCommand class methodsFor: 'accessing'!
-
-key
-	^ 84
-!
-
-label
-	^ 'Toggle'
-! !
-
-HLToggleCommand subclass: #HLToggleClassSideCommand
- instanceVariableNames: ''
- package: 'Helios-Commands'!
-
-!HLToggleClassSideCommand methodsFor: 'executing'!
-
-execute
-	self model showInstance: false
-! !
-
-!HLToggleClassSideCommand class methodsFor: 'accessing'!
-
-key
-	"c"
-    
-	^ 67
-!
-
-label
-	^ 'Class side'
-! !
-
-HLToggleCommand subclass: #HLToggleInstanceSideCommand
- instanceVariableNames: ''
- package: 'Helios-Commands'!
-
-!HLToggleInstanceSideCommand methodsFor: 'executing'!
-
-execute
-	self model showInstance: true
-! !
-
-!HLToggleInstanceSideCommand class methodsFor: 'accessing'!
-
-key
-	"i"
-    
-	^ 73
-!
-
-label
-	^ 'Instance side'
-! !
-
-HLCommand subclass: #HLOpenCommand
- instanceVariableNames: ''
- package: 'Helios-Commands'!
-
-!HLOpenCommand class methodsFor: 'accessing'!
-
-key
-	^ 79
-!
-
-label
-	^ 'Open'
-! !
-
-HLOpenCommand subclass: #HLOpenBrowserCommand
- instanceVariableNames: ''
- package: 'Helios-Commands'!
-
-!HLOpenBrowserCommand methodsFor: 'executing'!
-
-execute
-	^ HLBrowser openAsTab
-! !
-
-!HLOpenBrowserCommand class methodsFor: 'accessing'!
-
-key
-	^ 66
-!
-
-label
-	^ 'Browser'
-! !
-
-HLOpenCommand subclass: #HLOpenTranscriptCommand
- instanceVariableNames: ''
- package: 'Helios-Commands'!
-
-!HLOpenTranscriptCommand methodsFor: 'executing'!
-
-execute
-	^ HLTranscript openAsTab
-! !
-
-!HLOpenTranscriptCommand class methodsFor: 'accessing'!
-
-key
-	^ 84
-!
-
-label
-	^ 'Transcript'
-! !
-
-HLOpenCommand subclass: #HLOpenWorkspaceCommand
- instanceVariableNames: ''
- package: 'Helios-Commands'!
-
-!HLOpenWorkspaceCommand methodsFor: 'executing'!
-
-execute
-	^ HLCodeWidget openAsTab
-! !
-
-!HLOpenWorkspaceCommand class methodsFor: 'accessing'!
-
-key
-	^ 87
-!
-
-label
-	^ 'Workspace'
-! !
-
-HLCommand subclass: #HLViewCommand
- instanceVariableNames: ''
- package: 'Helios-Commands'!
-
-!HLViewCommand class methodsFor: 'accessing'!
-
-label
-	^ 'View'
-! !
-

+ 15 - 19
st/Helios-Core.st

@@ -372,7 +372,7 @@ compilationProtocol
 withHelperLabelled: aString do: aBlock
 	"TODO: doesn't belong here"
 
-	(window jQuery: '#helper') remove.
+	'#helper' asJQuery remove.
 
 	[ :html |
 		html div 
@@ -381,7 +381,7 @@ withHelperLabelled: aString do: aBlock
 	
 	[
 		aBlock value.
-		(window jQuery: '#helper') remove
+		'#helper' asJQuery remove
 	] 
 		valueWithTimeout: 10
 ! !
@@ -580,10 +580,6 @@ wrapper
 
 !HLWidget methodsFor: 'actions'!
 
-alert: aString
-	window alert: aString
-!
-
 confirm: aString ifTrue: aBlock
 	self manager confirm: aString ifTrue: aBlock
 !
@@ -781,7 +777,7 @@ selectedItem: anObject
 !HLListWidget methodsFor: 'actions'!
 
 activateFirstListItem
-	self activateListItem: (window jQuery: ((wrapper asJQuery find: 'li.inactive') get: 0))
+	self activateListItem: ((wrapper asJQuery find: 'li.inactive') eq: 0)
 !
 
 activateItem: anObject
@@ -820,7 +816,7 @@ activatePreviousListItem
 ensureVisible: aListItem	
 	"Move the scrollbar to show the active element"
 	
-	| perent position |
+	| parent position |
 	
 	position := self positionOf: aListItem.
 	parent := aListItem parent.
@@ -1228,7 +1224,7 @@ defaultEnvironment
 	(parent isNil or: [ (parent at: 'smalltalk') isNil ])
 		ifTrue: [ ^ Environment new ].
 	
-	^ ((parent at: 'smalltalk')
+	^ ((parent at: 'global_smalltalk')
 		at: 'Environment') new
 ! !
 
@@ -1249,7 +1245,7 @@ initialize
 !HLManager methodsFor: 'rendering'!
 
 refresh
-	(window jQuery: '.navbar') remove.
+	'.navbar' asJQuery remove.
 	self appendToJQuery: 'body' asJQuery
 !
 
@@ -1337,7 +1333,7 @@ clearKeydownEvent
 	"Prevent default keydown event with arrow key from scrolling the parent page
 	when helios is run inside a frame."
 	
-	(window jQuery: 'body') keydown: [ :e | 
+	'body' asJQuery keydown: [ :e | 
 		(e keyCode >= 37 and: [ e keyCode <= 40 ])
 			ifTrue: [ false ] ]
 ! !
@@ -1361,10 +1357,10 @@ cancel
 !
 
 remove
-	(window jQuery: '.dialog') removeClass: 'active'.
+	'.dialog' asJQuery removeClass: 'active'.
 	[ 
-		(window jQuery: '#overlay') remove.
-		(window jQuery: '.dialog') remove
+		'#overlay' asJQuery remove.
+		'.dialog' asJQuery remove
 	] valueWithTimeout: 300
 ! !
 
@@ -1384,7 +1380,7 @@ renderContentOn: html
 				renderMainOn: html;
 				renderButtonsOn: html ].
 
-	(window jQuery: '.dialog') addClass: 'active'.
+	'.dialog' asJQuery addClass: 'active'.
 	self setupKeyBindings
 !
 
@@ -1392,7 +1388,7 @@ renderMainOn: html
 !
 
 setupKeyBindings
-	(window jQuery: '.dialog') keyup: [ :e |
+	'.dialog' asJQuery keyup: [ :e |
 		e keyCode = 27 ifTrue: [ self cancel ] ]
 ! !
 
@@ -1443,10 +1439,10 @@ confirm
 !
 
 remove
-	(window jQuery: '.dialog') removeClass: 'active'.
+	'.dialog' asJQuery removeClass: 'active'.
 	[ 
-		(window jQuery: '#overlay') remove.
-		(window jQuery: '.dialog') remove
+		'#overlay' asJQuery remove.
+		'.dialog' asJQuery remove
 	] valueWithTimeout: 300
 ! !
 

+ 3 - 3
st/Helios-KeyBindings.st

@@ -462,7 +462,7 @@ handleKeyDown: event
 !
 
 setupEvents
-	(window jQuery: 'body') keydown: [ :event | self handleKeyDown: event ]
+	'body' asJQuery keydown: [ :event | self handleKeyDown: event ]
 ! !
 
 !HLKeyBinder methodsFor: 'initialization'!
@@ -578,14 +578,14 @@ renderSelectionOn: html
 !
 
 renderStart
-	(window jQuery: '#helper') remove.
+	'#helper' asJQuery remove.
 
 	[ :html |
 		html div 
 			id: 'helper';
 			with: 'Press ', self keyBinder activationKeyLabel, ' to start' ] appendToJQuery: 'body' asJQuery.
 	
-	[ (window jQuery: '#helper') fadeOut: 1000 ] 
+	[ '#helper' asJQuery fadeOut: 1000 ] 
 		valueWithTimeout: 2000
 ! !
 

+ 2 - 2
st/Helios-Workspace.st

@@ -215,8 +215,8 @@ messageHintFor: anEditor token: aToken
 variableHintFor: anEditor token: aToken
 	| variables classNames pseudoVariables |
 	
-	variables := ((window jQuery: anEditor display wrapper) find: 'span.cm-variable') get
-		collect: [ :each | (window jQuery: each) html ].
+	variables := (anEditor display wrapper asJQuery find: 'span.cm-variable') get
+		collect: [ :each | each asJQuery html ].
 	
 	classNames := Smalltalk current classes collect: [ :each | each name ].
 	pseudoVariables := Smalltalk current pseudoVariableNames.

+ 24 - 22
st/IDE.st

@@ -245,7 +245,7 @@ eval: aString
 	| compiler |
 	compiler := Compiler new.
 	[ compiler parseExpression: aString ] on: Error do: [:ex |
-		^window alert: ex messageText].
+		^self alert: ex messageText].
 	^compiler evaluateExpression: aString on: self receiver
 !
 
@@ -380,15 +380,15 @@ newBrowserTab
 !
 
 onResize: aBlock
-	<jQuery('#amber').resizable({
-	handles: 'n',
-	resize: aBlock,
-	minHeight: 230
-})>
+	'#amber' asJQuery resizable: #{
+		'handles' -> 'n'.
+		'resize' -> aBlock.
+		'minHeight' -> 230
+	}
 !
 
 onWindowResize: aBlock
-	<jQuery(window).resize(aBlock)>
+	window asJQuery resize: aBlock
 !
 
 open
@@ -432,7 +432,9 @@ updateBodyMargin
 !
 
 updatePosition
-	<jQuery('#amber').css('top', '').css('bottom', '0px')>
+	'#amber' asJQuery
+		css: 'top' put: '';
+		css: 'bottom' put: '0px'
 ! !
 
 !TabManager methodsFor: 'adding/Removing'!
@@ -535,10 +537,10 @@ TabManager class instanceVariableNames: 'current'!
 !TabManager class methodsFor: 'actions'!
 
 toggleAmberIDE
-	(window jQuery: '#amber') length = 0
+	'#amber' asJQuery length = 0
 		ifTrue: [ Browser open ]
 		ifFalse: [
-			((window jQuery: '#amber') is: ':visible')
+			('#amber' asJQuery is: ':visible')
 				ifTrue: [ TabManager current close ]
 				ifFalse: [ TabManager current open ] ]
 ! !
@@ -780,7 +782,7 @@ addInstanceVariableNamed: aString toClass: aClass
 
 addNewClass
 	| className |
-	className := window prompt: 'New class'.
+	className := self prompt: 'New class'.
 	(className notNil and: [className notEmpty]) ifTrue: [
 		Object subclass: className instanceVariableNames: '' package: self selectedPackage.
 			self
@@ -791,7 +793,7 @@ addNewClass
 
 addNewProtocol
 	| newProtocol |
-	newProtocol := window prompt: 'New method protocol'.
+	newProtocol := self prompt: 'New method protocol'.
 	(newProtocol notNil and: [newProtocol notEmpty]) ifTrue: [
 	selectedMethod category: newProtocol.
 	self setMethodProtocol: newProtocol]
@@ -799,7 +801,7 @@ addNewProtocol
 
 cancelChanges
 	^unsavedChanges
-	ifTrue: [window confirm: 'Cancel changes?']
+	ifTrue: [self confirm: 'Cancel changes?']
 	ifFalse: [true]
 !
 
@@ -851,13 +853,13 @@ compileMethodDefinitionFor: aClass
 	compiler source: source.
 	node := compiler parse: source.
 	node isParseFailure ifTrue: [
-	^window alert: 'PARSE ERROR: ', node reason, ', position: ', node position asString].
+	^self alert: 'PARSE ERROR: ', node reason, ', position: ', node position asString].
 	compiler currentClass: aClass.
 	method := compiler eval: (compiler compileNode: node).
 	compiler unknownVariables do: [:each |
 		"Do not try to redeclare javascript's objects"
-		(window at: each) ifNil: [
-		(window confirm: 'Declare ''', each, ''' as instance variable?') ifTrue: [
+		(PlatformInterface existsGlobal: each) ifFalse: [
+		(self confirm: 'Declare ''', each, ''' as instance variable?') ifTrue: [
 			self addInstanceVariableNamed: each toClass: aClass.
 			^self compileMethodDefinitionFor: aClass]]].
 	ClassBuilder new installMethod: method forClass: aClass category: selectedProtocol.
@@ -867,7 +869,7 @@ compileMethodDefinitionFor: aClass
 
 copyClass
 	| className |
-	className := window prompt: 'Copy class'.
+	className := self prompt: 'Copy class'.
 	(className notNil and: [className notEmpty]) ifTrue: [
 		ClassBuilder new copyClass: self selectedClass named: className.
 			self
@@ -902,7 +904,7 @@ hideMethodButtons
 !
 
 removeClass
-	(window confirm: 'Do you really want to remove ', selectedClass name, '?')
+	(self confirm: 'Do you really want to remove ', selectedClass name, '?')
 	ifTrue: [
 		Smalltalk current removeClass: selectedClass.
 		self resetClassesList.
@@ -911,7 +913,7 @@ removeClass
 
 removeMethod
 	self cancelChanges ifTrue: [
-	(window confirm: 'Do you really want to remove #', selectedMethod selector, '?')
+	(self confirm: 'Do you really want to remove #', selectedMethod selector, '?')
 		ifTrue: [
 		selectedTab = #instance
 			ifTrue: [selectedClass removeCompiledMethod: selectedMethod]
@@ -921,7 +923,7 @@ removeMethod
 
 removePackage
 
-	(window confirm: 'Do you really want to remove the whole package ', selectedPackage, ' with all its classes?')
+	(self confirm: 'Do you really want to remove the whole package ', selectedPackage, ' with all its classes?')
 	ifTrue: [
 		Smalltalk current removePackage: selectedPackage.
 		self updateCategoriesList]
@@ -929,7 +931,7 @@ removePackage
 
 renameClass
 	| newName |
-	newName := window prompt: 'Rename class ', selectedClass name.
+	newName := self prompt: 'Rename class ', selectedClass name.
 	(newName notNil and: [newName notEmpty]) ifTrue: [
 	selectedClass rename: newName.
 	self
@@ -940,7 +942,7 @@ renameClass
 renamePackage
 
 	| newName |
-	newName := window prompt: 'Rename package ', selectedPackage.
+	newName := self prompt: 'Rename package ', selectedPackage.
 	newName ifNotNil: [
 	newName notEmpty ifTrue: [
 	Smalltalk current renamePackage: selectedPackage to: newName.

+ 584 - 251
st/Importer-Exporter.st

@@ -1,54 +1,179 @@
 Smalltalk current createPackage: 'Importer-Exporter'!
-Object subclass: #ChunkParser
-	instanceVariableNames: 'stream'
+Object subclass: #AbstractExporter
+	instanceVariableNames: ''
 	package: 'Importer-Exporter'!
-!ChunkParser commentStamp!
-I am responsible for parsing aStream contents in the chunk format.
+!AbstractExporter commentStamp!
+I am an abstract exporter for Amber source code.!
 
-## API
+!AbstractExporter methodsFor: 'convenience'!
 
-    ChunkParser new
-        stream: aStream;
-        nextChunk!
+chunkEscape: aString
+	"Replace all occurrences of !! with !!!! and trim at both ends."
 
-!ChunkParser methodsFor: 'accessing'!
+	^(aString replace: '!!' with: '!!!!') trimBoth
+!
 
-stream: aStream
-	stream := aStream
+classNameFor: aClass
+	^aClass isMetaclass
+		ifTrue: [ aClass instanceClass name, ' class' ]
+		ifFalse: [
+			aClass isNil
+				ifTrue: [ 'nil' ]
+				ifFalse: [ aClass name ] ]
 ! !
 
-!ChunkParser methodsFor: 'reading'!
+!AbstractExporter methodsFor: 'fileOut'!
 
-nextChunk
-	"The chunk format (Smalltalk Interchange Format or Fileout format)
-	is a trivial format but can be a bit tricky to understand:
-		- Uses the exclamation mark as delimiter of chunks.
-		- Inside a chunk a normal exclamation mark must be doubled.
-		- A non empty chunk must be a valid Smalltalk expression.
-		- A chunk on top level with a preceding empty chunk is an instruction chunk:
-			- The object created by the expression then takes over reading chunks.
+recipe
+	"Recipe to export a given package."
 
-	This metod returns next chunk as a String (trimmed), empty String (all whitespace) or nil."
+	self subclassResponsibility
+! !
 
-	| char result chunk |
-	result := '' writeStream.
-		[char := stream next.
-		char notNil] whileTrue: [
-				char = '!!' ifTrue: [
-						stream peek = '!!'
-								ifTrue: [stream next "skipping the escape double"]
-								ifFalse: [^result contents trimBoth "chunk end marker found"]].
-				result nextPut: char].
-	^nil "a chunk needs to end with !!"
+AbstractExporter class instanceVariableNames: 'default'!
+
+!AbstractExporter class methodsFor: 'instance creation'!
+
+default
+	^ default ifNil: [ default := self new ]
 ! !
 
-!ChunkParser class methodsFor: 'not yet classified'!
+AbstractExporter subclass: #ChunkExporter
+	instanceVariableNames: ''
+	package: 'Importer-Exporter'!
+!ChunkExporter commentStamp!
+I am an exporter dedicated to outputting Amber source code in the classic Smalltalk chunk format.
 
-on: aStream
-	^self new stream: aStream
+I do not output any compiled code.!
+
+!ChunkExporter methodsFor: 'accessing'!
+
+extensionCategoriesOfPackage: aPackage
+	"Issue #143: sort protocol alphabetically"
+
+	| name map result |
+	name := aPackage name.
+	result := OrderedCollection new.
+	(Package sortedClasses: Smalltalk current classes) do: [:each |
+		{each. each class} do: [:aClass |
+			map := Dictionary new.
+			aClass protocolsDo: [:category :methods |
+				(category match: '^\*', name) ifTrue: [ map at: category put: methods ]].
+			result addAll: ((map keys sorted: [:a :b | a <= b ]) collect: [:category |
+				MethodCategory name: category theClass: aClass methods: (map at: category)]) ]].
+	^result
+!
+
+methodsOfCategory: aCategory
+	"Issue #143: sort methods alphabetically"
+
+	^(aCategory methods) sorted: [:a :b | a selector <= b selector]
+!
+
+ownCategoriesOfClass: aClass
+	"Answer the protocols of aClassthat are not package extensions"
+	
+	"Issue #143: sort protocol alphabetically"
+
+	| map |
+	map := Dictionary new.
+	aClass protocolsDo: [:category :methods |
+		(category match: '^\*') ifFalse: [ map at: category put: methods ]].
+	^(map keys sorted: [:a :b | a <= b ]) collect: [:category |
+		MethodCategory name: category theClass: aClass methods: (map at: category) ]
+!
+
+ownCategoriesOfMetaClass: aClass
+	"Issue #143: sort protocol alphabetically"
+
+	^self ownCategoriesOfClass: aClass class
 ! !
 
-Object subclass: #Exporter
+!ChunkExporter methodsFor: 'fileOut'!
+
+recipe
+	"Export a given package."
+
+	| exportCategoryRecipe |
+	exportCategoryRecipe := {
+		self -> #exportCategoryPrologueOf:on:.
+		{
+			self -> #methodsOfCategory:.
+			self -> #exportMethod:on: }.
+		self -> #exportCategoryEpilogueOf:on: }.
+
+	^{
+		self -> #exportPackageDefinitionOf:on:.
+		{
+			PluggableExporter -> #ownClassesOfPackage:.
+			self -> #exportDefinitionOf:on:.
+			{ self -> #ownCategoriesOfClass: }, exportCategoryRecipe.
+			self -> #exportMetaDefinitionOf:on:.
+			{ self -> #ownCategoriesOfMetaClass: }, exportCategoryRecipe }.
+		{ self -> #extensionCategoriesOfPackage: }, exportCategoryRecipe
+	}
+! !
+
+!ChunkExporter methodsFor: 'output'!
+
+exportCategoryEpilogueOf: aCategory on: aStream
+	aStream nextPutAll: ' !!'; lf; lf
+!
+
+exportCategoryPrologueOf: aCategory on: aStream
+	aStream
+		nextPutAll: '!!', (self classNameFor: aCategory theClass);
+		nextPutAll: ' methodsFor: ''', aCategory name, '''!!'
+!
+
+exportDefinitionOf: aClass on: aStream
+	"Chunk format."
+
+	aStream
+		nextPutAll: (self classNameFor: aClass superclass);
+		nextPutAll: ' subclass: #', (self classNameFor: aClass); lf;
+		tab; nextPutAll: 'instanceVariableNames: '''.
+	aClass instanceVariableNames
+		do: [:each | aStream nextPutAll: each]
+		separatedBy: [aStream nextPutAll: ' '].
+	aStream
+		nextPutAll: ''''; lf;
+		tab; nextPutAll: 'package: ''', aClass category, '''!!'; lf.
+	aClass comment notEmpty ifTrue: [
+		aStream
+		nextPutAll: '!!', (self classNameFor: aClass), ' commentStamp!!';lf;
+		nextPutAll: (self chunkEscape: aClass comment), '!!';lf].
+	aStream lf
+!
+
+exportMetaDefinitionOf: aClass on: aStream
+
+	aClass class instanceVariableNames isEmpty ifFalse: [
+		aStream
+			nextPutAll: (self classNameFor: aClass class);
+			nextPutAll: ' instanceVariableNames: '''.
+		aClass class instanceVariableNames
+			do: [:each | aStream nextPutAll: each]
+			separatedBy: [aStream nextPutAll: ' '].
+		aStream
+			nextPutAll: '''!!'; lf; lf]
+!
+
+exportMethod: aMethod on: aStream
+	aStream
+		lf; lf; nextPutAll: (self chunkEscape: aMethod source); lf;
+		nextPutAll: '!!'
+!
+
+exportPackageDefinitionOf: aPackage on: aStream
+	"Chunk format."
+
+	aStream
+		nextPutAll: 'Smalltalk current createPackage: ''', aPackage name, '''!!';
+		lf
+! !
+
+AbstractExporter subclass: #Exporter
 	instanceVariableNames: ''
 	package: 'Importer-Exporter'!
 !Exporter commentStamp!
@@ -64,59 +189,76 @@ I am typically used to save code outside of the Amber runtime (committing to dis
 
 Use `#exportAll`, `#exportClass:` or `#exportPackage:` methods.!
 
-!Exporter methodsFor: 'fileOut'!
+!Exporter methodsFor: 'accessing'!
 
-exportAll
-	"Export all packages in the system."
+extensionMethodsOfPackage: aPackage
+	"Issue #143: sort classes and methods alphabetically"
 
-	^String streamContents: [:stream |
-		Smalltalk current packages do: [:pkg |
-		stream nextPutAll: (self exportPackage: pkg name)]]
+	| name result |
+	name := aPackage name.
+	result := OrderedCollection new.
+	(Package sortedClasses: Smalltalk current classes) do: [:each |
+		{each. each class} do: [:aClass |
+			result addAll: (((aClass methodDictionary values)
+				sorted: [:a :b | a selector <= b selector])
+				select: [:method | method category match: '^\*', name]) ]].
+	^result
 !
 
-exportClass: aClass
-	"Export a single class. Subclasses override these methods."
+ownMethodsOfClass: aClass
+	"Issue #143: sort methods alphabetically"
 
-	^String streamContents: [:stream |
-		self exportDefinitionOf: aClass on: stream.
-		self exportMethodsOf: aClass on: stream.
-		self exportMetaDefinitionOf: aClass on: stream.
-		self exportMethodsOf: aClass class on: stream]
+	^((aClass methodDictionary values) sorted: [:a :b | a selector <= b selector])
+		reject: [:each | (each category match: '^\*')]
 !
 
-exportPackage: packageName
-	"Export a given package by name."
-
-	| package |
-	^String streamContents: [:stream |
-		self exportPackagePrologueOn: stream.
-		[
-			package := Smalltalk current packageAt: packageName.
-			self exportPackageDefinitionOf: package on: stream.
+ownMethodsOfMetaClass: aClass
+	"Issue #143: sort methods alphabetically"
 
-			"Export classes in dependency order.
-			Update (issue #171): Remove duplicates for export"
-			package sortedClasses asSet do: [:each |
-						stream nextPutAll: (self exportClass: each)].
-			self exportPackageExtensionsOf: package on: stream
-		] ensure: [
-			self exportPackageEpilogueOn: stream
-		]]
+	^self ownMethodsOfClass: aClass class
 ! !
 
-!Exporter methodsFor: 'private'!
+!Exporter methodsFor: 'convenience'!
 
 classNameFor: aClass
 	^aClass isMetaclass
-		ifTrue: [aClass instanceClass name, '.klass']
+		ifTrue: [ aClass instanceClass name, '.klass' ]
 		ifFalse: [
-		aClass isNil
-			ifTrue: ['nil']
-			ifFalse: [aClass name]]
-!
+			aClass isNil
+				ifTrue: [ 'nil' ]
+				ifFalse: [ aClass name ] ]
+! !
+
+!Exporter methodsFor: 'fileOut'!
+
+recipe
+	"Export a given package."
+
+	^{
+		self -> #exportPackagePrologueOf:on:.
+		self -> #exportPackageDefinitionOf:on:.
+		{
+			PluggableExporter -> #ownClassesOfPackage:.
+			self -> #exportDefinitionOf:on:.
+			{
+				self -> #ownMethodsOfClass:.
+				self -> #exportMethod:on: }.
+			self -> #exportMetaDefinitionOf:on:.
+			{
+				self -> #ownMethodsOfMetaClass:.
+				self -> #exportMethod:on: } }.
+		{
+			self -> #extensionMethodsOfPackage:.
+			self -> #exportMethod:on: }.
+		self -> #exportPackageEpilogueOf:on:
+	}
+! !
+
+!Exporter methodsFor: 'output'!
 
 exportDefinitionOf: aClass on: aStream
 	aStream
+		lf;
 		nextPutAll: 'smalltalk.addClass(';
 		nextPutAll: '''', (self classNameFor: aClass), ''', ';
 		nextPutAll: 'smalltalk.', (self classNameFor: aClass superclass);
@@ -140,6 +282,7 @@ exportDefinitionOf: aClass on: aStream
 !
 
 exportMetaDefinitionOf: aClass on: aStream
+	aStream lf.
 	aClass class instanceVariableNames isEmpty ifFalse: [
 		aStream
 		nextPutAll: 'smalltalk.', (self classNameFor: aClass class);
@@ -150,7 +293,7 @@ exportMetaDefinitionOf: aClass on: aStream
 		aStream nextPutAll: '];', String lf]
 !
 
-exportMethod: aMethod of: aClass on: aStream
+exportMethod: aMethod on: aStream
 	aStream
 		nextPutAll: 'smalltalk.addMethod(';lf;
 		"nextPutAll: aMethod selector asSelector asJavascript, ',';lf;"
@@ -165,184 +308,40 @@ exportMethod: aMethod of: aClass on: aStream
 	aStream
 		lf;
 		nextPutAll: '}),';lf;
-		nextPutAll: 'smalltalk.', (self classNameFor: aClass);
+		nextPutAll: 'smalltalk.', (self classNameFor: aMethod methodClass);
 		nextPutAll: ');';lf;lf
 !
 
-exportMethodsOf: aClass on: aStream
-	"Issue #143: sort methods alphabetically"
-
-	((aClass methodDictionary values) sorted: [:a :b | a selector <= b selector]) do: [:each |
-		(each category match: '^\*') ifFalse: [
-			self exportMethod: each of: aClass on: aStream]].
-	aStream lf
-!
-
-exportPackageDefinitionOf: package on: aStream
+exportPackageDefinitionOf: aPackage on: aStream
 	aStream
 		nextPutAll: 'smalltalk.addPackage(';
-		nextPutAll: '''', package name, ''');';
+		nextPutAll: '''', aPackage name, ''');';
 		lf
 !
 
-exportPackageEpilogueOn: aStream
+exportPackageEpilogueOf: aPackage on: aStream
 	aStream
 		nextPutAll: '})(global_smalltalk,global_nil,global__st);';
 		lf
 !
 
-exportPackageExtensionsOf: package on: aStream
-	"Issue #143: sort classes and methods alphabetically"
-
-	| name |
-	name := package name.
-	(Package sortedClasses: Smalltalk current classes) do: [:each |
-		{each. each class} do: [:aClass |
-			((aClass methodDictionary values) sorted: [:a :b | a selector <= b selector]) do: [:method |
-				(method category match: '^\*', name) ifTrue: [
-					self exportMethod: method of: aClass on: aStream ]]]]
-!
-
-exportPackagePrologueOn: aStream
+exportPackagePrologueOf: aPackage on: aStream
 	aStream
 		nextPutAll: '(function(smalltalk,nil,_st){';
 		lf
 ! !
 
-Exporter subclass: #ChunkExporter
-	instanceVariableNames: ''
-	package: 'Importer-Exporter'!
-!ChunkExporter commentStamp!
-I am an exporter dedicated to outputting Amber source code in the classic Smalltalk chunk format.
-
-I do not output any compiled code.!
-
-!ChunkExporter methodsFor: 'private'!
-
-chunkEscape: aString
-	"Replace all occurrences of !! with !!!! and trim at both ends."
-
-	^(aString replace: '!!' with: '!!!!') trimBoth
-!
-
-classNameFor: aClass
-	^aClass isMetaclass
-		ifTrue: [aClass instanceClass name, ' class']
-		ifFalse: [
-		aClass isNil
-			ifTrue: ['nil']
-			ifFalse: [aClass name]]
-!
-
-exportDefinitionOf: aClass on: aStream
-	"Chunk format."
-
-	aStream
-		nextPutAll: (self classNameFor: aClass superclass);
-		nextPutAll: ' subclass: #', (self classNameFor: aClass); lf;
-		tab; nextPutAll: 'instanceVariableNames: '''.
-	aClass instanceVariableNames
-		do: [:each | aStream nextPutAll: each]
-		separatedBy: [aStream nextPutAll: ' '].
-	aStream
-		nextPutAll: ''''; lf;
-		tab; nextPutAll: 'package: ''', aClass category, '''!!'; lf.
-	aClass comment notEmpty ifTrue: [
-		aStream
-		nextPutAll: '!!', (self classNameFor: aClass), ' commentStamp!!';lf;
-		nextPutAll: (self chunkEscape: aClass comment), '!!';lf].
-	aStream lf
-!
-
-exportMetaDefinitionOf: aClass on: aStream
-
-	aClass class instanceVariableNames isEmpty ifFalse: [
-		aStream
-			nextPutAll: (self classNameFor: aClass class);
-			nextPutAll: ' instanceVariableNames: '''.
-		aClass class instanceVariableNames
-			do: [:each | aStream nextPutAll: each]
-			separatedBy: [aStream nextPutAll: ' '].
-		aStream
-			nextPutAll: '''!!'; lf; lf]
-!
-
-exportMethod: aMethod of: aClass on: aStream
-	aStream
-		lf; lf; nextPutAll: (self chunkEscape: aMethod source); lf;
-		nextPutAll: '!!'
-!
-
-exportMethods: methods category: category of: aClass on: aStream
-	"Issue #143: sort methods alphabetically"
-
-	aStream
-		nextPutAll: '!!', (self classNameFor: aClass);
-		nextPutAll: ' methodsFor: ''', category, '''!!'.
-		(methods sorted: [:a :b | a selector <= b selector]) do: [:each |
-				self exportMethod: each of: aClass on: aStream].
-	aStream nextPutAll: ' !!'; lf; lf
-!
-
-exportMethodsOf: aClass on: aStream
-	"Issue #143: sort protocol alphabetically"
-
-	| map |
-	map := Dictionary new.
-	aClass protocolsDo: [:category :methods |
-		(category match: '^\*') ifFalse: [ map at: category put: methods ]].
-	(map keys sorted: [:a :b | a <= b ]) do: [:category | | methods |
-		methods := map at: category.
-		self
-			exportMethods: methods
-			category: category
-			of: aClass
-			on: aStream ]
-!
-
-exportPackageDefinitionOf: package on: aStream
-	"Chunk format."
-
-	aStream
-		nextPutAll: 'Smalltalk current createPackage: ''', package name, '''!!';
-		lf
-!
-
-exportPackageEpilogueOn: aStream
-!
-
-exportPackageExtensionsOf: package on: aStream
-	"We need to override this one too since we need to group
-	all methods in a given protocol under a leading methodsFor: chunk
-	for that class."
-
-	"Issue #143: sort protocol alphabetically"
-
-	| name map |
-	name := package name.
-	(Package sortedClasses: Smalltalk current classes) do: [:each |
-		{each. each class} do: [:aClass |
-			map := Dictionary new.
-			aClass protocolsDo: [:category :methods |
-				(category match: '^\*', name) ifTrue: [ map at: category put: methods ]].
-			(map keys sorted: [:a :b | a <= b ]) do: [:category | | methods |
-				methods := map at: category.
-				self exportMethods: methods category: category of: aClass on: aStream ]]]
-!
-
-exportPackagePrologueOn: aStream
-! !
-
 Exporter subclass: #StrippedExporter
 	instanceVariableNames: ''
 	package: 'Importer-Exporter'!
 !StrippedExporter commentStamp!
 I export Amber code into a JavaScript string, but without any optional associated data like the Amber source code.!
 
-!StrippedExporter methodsFor: 'private'!
+!StrippedExporter methodsFor: 'output'!
 
 exportDefinitionOf: aClass on: aStream
 	aStream
+		lf;
 		nextPutAll: 'smalltalk.addClass(';
 		nextPutAll: '''', (self classNameFor: aClass), ''', ';
 		nextPutAll: 'smalltalk.', (self classNameFor: aClass superclass);
@@ -357,7 +356,7 @@ exportDefinitionOf: aClass on: aStream
 	aStream lf
 !
 
-exportMethod: aMethod of: aClass on: aStream
+exportMethod: aMethod on: aStream
 	aStream
 		nextPutAll: 'smalltalk.addMethod(';lf;
 		"nextPutAll: aMethod selector asSelector asJavascript, ',';lf;"
@@ -366,10 +365,59 @@ exportMethod: aMethod of: aClass on: aStream
 		nextPutAll: 'fn: ', aMethod fn compiledSource, ',';lf;
 		nextPutAll: 'messageSends: ', aMethod messageSends asJavascript;
 		nextPutAll: '}),';lf;
-		nextPutAll: 'smalltalk.', (self classNameFor: aClass);
+		nextPutAll: 'smalltalk.', (self classNameFor: aMethod methodClass);
 		nextPutAll: ');';lf;lf
 ! !
 
+Object subclass: #ChunkParser
+	instanceVariableNames: 'stream'
+	package: 'Importer-Exporter'!
+!ChunkParser commentStamp!
+I am responsible for parsing aStream contents in the chunk format.
+
+## API
+
+    ChunkParser new
+        stream: aStream;
+        nextChunk!
+
+!ChunkParser methodsFor: 'accessing'!
+
+stream: aStream
+	stream := aStream
+! !
+
+!ChunkParser methodsFor: 'reading'!
+
+nextChunk
+	"The chunk format (Smalltalk Interchange Format or Fileout format)
+	is a trivial format but can be a bit tricky to understand:
+		- Uses the exclamation mark as delimiter of chunks.
+		- Inside a chunk a normal exclamation mark must be doubled.
+		- A non empty chunk must be a valid Smalltalk expression.
+		- A chunk on top level with a preceding empty chunk is an instruction chunk:
+			- The object created by the expression then takes over reading chunks.
+
+	This metod returns next chunk as a String (trimmed), empty String (all whitespace) or nil."
+
+	| char result chunk |
+	result := '' writeStream.
+		[char := stream next.
+		char notNil] whileTrue: [
+				char = '!!' ifTrue: [
+						stream peek = '!!'
+								ifTrue: [stream next "skipping the escape double"]
+								ifFalse: [^result contents trimBoth "chunk end marker found"]].
+				result nextPut: char].
+	^nil "a chunk needs to end with !!"
+! !
+
+!ChunkParser class methodsFor: 'not yet classified'!
+
+on: aStream
+	^self new stream: aStream
+! !
+
 Object subclass: #Importer
 	instanceVariableNames: ''
 	package: 'Importer-Exporter'!
@@ -398,7 +446,52 @@ import: aStream
 									result scanFrom: parser]]]
 ! !
 
-Object subclass: #PackageHandler
+Object subclass: #MethodCategory
+	instanceVariableNames: 'methods name theClass'
+	package: 'Importer-Exporter'!
+!MethodCategory commentStamp!
+I am an abstraction for a method category in a class / metaclass.
+
+I know of my class, name and methods.
+I am used when exporting a package.!
+
+!MethodCategory methodsFor: 'accessing'!
+
+methods
+	^methods
+!
+
+methods: aCollection
+	methods := aCollection
+!
+
+name
+	^name
+!
+
+name: aString
+	name := aString
+!
+
+theClass
+	^theClass
+!
+
+theClass: aClass
+	theClass := aClass
+! !
+
+!MethodCategory class methodsFor: 'not yet classified'!
+
+name: aString theClass: aClass methods: anArray
+	^self new
+		name: aString;
+		theClass: aClass;
+		methods: anArray;
+		yourself
+! !
+
+InterfacingObject subclass: #PackageHandler
 	instanceVariableNames: ''
 	package: 'Importer-Exporter'!
 !PackageHandler commentStamp!
@@ -409,31 +502,100 @@ I should not be used directly. Instead, use the corresponding `Package` methods.
 !PackageHandler methodsFor: 'committing'!
 
 commit: aPackage
-	{ 
-		Exporter -> (aPackage commitPathJs, '/', aPackage name, '.js').
-		StrippedExporter -> (aPackage commitPathJs, '/', aPackage name, '.deploy.js').
-		ChunkExporter -> (aPackage commitPathSt, '/', aPackage name, '.st')
-	} 
-		do: [ :commitStrategy|| fileContents |
-			fileContents := (commitStrategy key new exportPackage: aPackage name).
+	self commitChannels
+		do: [ :commitStrategyFactory || fileContents commitStrategy |
+			commitStrategy := commitStrategyFactory value: aPackage.
+			fileContents := String streamContents: [ :stream |
+				(PluggableExporter forRecipe: commitStrategy key) exportPackage: aPackage on: stream ].
 			self ajaxPutAt: commitStrategy value data: fileContents ]
 		displayingProgress: 'Committing package ', aPackage name
+!
+
+commitChannels
+	self subclassResponsibility
 ! !
 
-!PackageHandler methodsFor: 'loading'!
+!PackageHandler methodsFor: 'private'!
+
+ajaxPutAt: aURL data: aString
+	self
+		ajax: #{
+			'url' -> aURL.
+			'type' -> 'PUT'.
+			'data' -> aString.
+			'contentType' -> 'text/plain;charset=UTF-8'.
+			'error' -> [ :xhr | self error: 'Commiting ' , aURL , ' failed with reason: "' , (xhr responseText) , '"'] }
+! !
+
+PackageHandler class instanceVariableNames: 'registry'!
+
+!PackageHandler class methodsFor: 'accessing'!
+
+classRegisteredFor: aString
+	^registry at: aString
+!
+
+for: aString
+	^(self classRegisteredFor: aString) new
+! !
+
+!PackageHandler class methodsFor: 'initialization'!
+
+initialize
+	super initialize.
+	registry := #{}
+! !
+
+!PackageHandler class methodsFor: 'registry'!
+
+register: aClass for: aString
+	registry at: aString put: aClass
+!
+
+registerFor: aString
+	PackageHandler register: self for: aString
+! !
+
+PackageHandler subclass: #LegacyPackageHandler
+	instanceVariableNames: ''
+	package: 'Importer-Exporter'!
+!LegacyPackageHandler commentStamp!
+I am responsible for handling package loading and committing.
+
+I should not be used directly. Instead, use the corresponding `Package` methods.!
+
+!LegacyPackageHandler methodsFor: 'committing'!
+
+commitChannels
+	^{ 
+		[ :pkg | Exporter default recipe -> (pkg commitPathJs, '/', pkg name, '.js') ].
+		[ :pkg | StrippedExporter default recipe -> (pkg commitPathJs, '/', pkg name, '.deploy.js') ].
+		[ :pkg | ChunkExporter default recipe -> (pkg commitPathSt, '/', pkg name, '.st') ]
+	}
+!
+
+commitPathJsFor: aPackage
+	^self class defaultCommitPathJs
+!
+
+commitPathStFor: aPackage
+	^self class defaultCommitPathSt
+! !
+
+!LegacyPackageHandler methodsFor: 'loading'!
 
 loadPackage: packageName prefix: aString
 	| url |
 	url := '/', aString, '/js/', packageName, '.js'.
-	jQuery
-		ajax: url
-		options: #{
+	self
+		ajax: #{
+			'url' -> url.
 			'type' -> 'GET'.
 			'dataType' -> 'script'.
 			'complete' -> [ :jqXHR :textStatus |
 				jqXHR readyState = 4
 					ifTrue: [ self setupPackageNamed: packageName prefix: aString ] ].
-			'error' -> [ window alert: 'Could not load package at: ', url ]
+			'error' -> [ self alert: 'Could not load package at: ', url ]
 		}
 !
 
@@ -442,17 +604,7 @@ loadPackages: aCollection prefix: aString
 		self loadPackage: each prefix: aString ]
 ! !
 
-!PackageHandler methodsFor: 'private'!
-
-ajaxPutAt: aURL data: aString
-	jQuery
-		ajax: aURL 
-		options: #{ 
-			'type' -> 'PUT'.
-			'data' -> aString.
-			'contentType' -> 'text/plain;charset=UTF-8'.
-			'error' -> [ :xhr | self error: 'Commiting ' , aURL , ' failed with reason: "' , (xhr responseText) , '"'] }
-!
+!LegacyPackageHandler methodsFor: 'private'!
 
 setupPackageNamed: packageName prefix: aString
 
@@ -462,15 +614,196 @@ setupPackageNamed: packageName prefix: aString
 		commitPathSt: '/', aString, '/st'
 ! !
 
-!PackageHandler class methodsFor: 'loading'!
+LegacyPackageHandler class instanceVariableNames: 'defaultCommitPathJs defaultCommitPathSt'!
+
+!LegacyPackageHandler class methodsFor: 'commit paths'!
+
+commitPathsFromLoader
+	<
+		var commitPath = typeof amber !!== 'undefined' && amber.commitPath;
+		if (!!commitPath) return;
+		if (commitPath.js) self._defaultCommitPathJs_(commitPath.js);
+		if (commitPath.st) self._defaultCommitPathSt_(commitPath.st);
+	>
+!
+
+defaultCommitPathJs
+	^ defaultCommitPathJs ifNil: [ defaultCommitPathJs := 'js']
+!
+
+defaultCommitPathJs: aString
+	defaultCommitPathJs := aString
+!
+
+defaultCommitPathSt
+	^ defaultCommitPathSt ifNil: [ defaultCommitPathSt := 'st']
+!
+
+defaultCommitPathSt: aString
+	defaultCommitPathSt := aString
+!
+
+resetCommitPaths
+	defaultCommitPathJs := nil.
+	defaultCommitPathSt := nil
+! !
+
+!LegacyPackageHandler class methodsFor: 'initialization'!
+
+initialize
+	super initialize.
+	self registerFor: 'unknown'.
+	self commitPathsFromLoader
+! !
+
+!LegacyPackageHandler class methodsFor: 'loading'!
 
 loadPackages: aCollection prefix: aString
 	^ self new loadPackages: aCollection prefix: aString
 ! !
 
+Object subclass: #PluggableExporter
+	instanceVariableNames: 'recipe'
+	package: 'Importer-Exporter'!
+!PluggableExporter commentStamp!
+I am an engine for exporting structured data on a Stream.
+
+My instances are created using
+  PluggableExporter newUsing: recipe,
+where recipe is structured description of the exporting algorithm.
+
+The actual exporting is done by interpreting the recipe using a `RecipeInterpreter`.
+
+
+I am used to export amber packages, so I have a convenience method
+`exportPackage: aPackage on: aStream`
+which exports `aPackage` using the `recipe`
+(it is otherwise no special, so it may be renamed to export:on:)!
+
+!PluggableExporter methodsFor: 'accessing'!
+
+interpreter
+	^ RecipeInterpreter new
+!
+
+recipe
+	^recipe
+!
+
+recipe: anArray
+	recipe := anArray
+! !
+
+!PluggableExporter methodsFor: 'fileOut'!
+
+exportAllPackages
+	"Export all packages in the system."
+
+	^String streamContents: [:stream |
+		Smalltalk current packages do: [:pkg |
+		self exportPackage: pkg on: stream]]
+!
+
+exportPackage: aPackage on: aStream
+	self interpreter interpret: self recipe for: aPackage on: aStream
+! !
+
+!PluggableExporter class methodsFor: 'convenience'!
+
+ownClassesOfPackage: package
+	"Export classes in dependency order.
+	Update (issue #171): Remove duplicates for export"
+	^package sortedClasses asSet
+! !
+
+!PluggableExporter class methodsFor: 'instance creation'!
+
+forRecipe: aRecipe
+	^self new recipe: aRecipe; yourself
+! !
+
+Object subclass: #RecipeInterpreter
+	instanceVariableNames: ''
+	package: 'Importer-Exporter'!
+!RecipeInterpreter commentStamp!
+I am an interpreter for export recipes.
+
+## Recipe format
+
+Recipe is an array, which can contain two kinds of elements:
+
+ - an assocation where the key is the receiver and the value is a two-arguments selector
+    In this case, `receiver perform: selector withArguments: { data. stream }` is called.
+	This essentially defines one step of export process.
+	The key (eg. receiver) is presumed to be some kind of 'repository' of the exporting methods
+	that just format appropriate aspect of data into a stream; like a class or a singleton,
+	so that the recipe itself can be decoupled from data.
+
+ - a subarray, where first element is special and the rest is recursive recipe.
+
+    `subarray first` must be an association similar to one above,
+	with key being the 'repository' receiver, but value is one-arg selector.
+	In this case, `receiver perform: selector withArguments: { data }` should create a collection.
+	Then, the sub-recipe (`subarray allButFirst`) is applied to every element of a collection, eg.
+	  collection do: [ :each | self export: each using: sa allButFirst on: stream ]!
+
+!RecipeInterpreter methodsFor: 'interpreting'!
+
+interpret: aRecipe for: anObject on: aStream
+	| recipeStream |
+	
+	recipeStream := aRecipe readStream.
+	
+	[ recipeStream atEnd ] whileFalse: [
+		self 
+			interpretStep: recipeStream next
+			for: anObject
+			on: aStream ]
+!
+
+interpretStep: aRecipeStep for: anObject on: aStream
+	aRecipeStep value == aRecipeStep ifTrue: [ 
+		^ self interpretSubRecipe: aRecipeStep for: anObject on: aStream ].
+			
+	aRecipeStep key perform: aRecipeStep value withArguments: { anObject. aStream }
+!
+
+interpretSubRecipe: aRecipe for: anObject on: aStream
+	| selection |
+	selection := aRecipe first key 
+		perform: aRecipe first value 
+		withArguments: { anObject }.
+	selection do: [ :each |	
+		self interpret: aRecipe allButFirst for: each on: aStream ]
+! !
+
 !Package methodsFor: '*Importer-Exporter'!
 
 commit
-	^ PackageHandler new commit: self
+	^ self transport commit: self
+!
+
+commitPathJs
+	^ (extension ifNil: [ extension := #{} ]) at: #commitPathJs ifAbsentPut: [self transport commitPathJsFor: self]
+!
+
+commitPathJs: aString
+	^ (extension ifNil: [ extension := #{} ]) at: #commitPathJs put: aString
+!
+
+commitPathSt
+	^ (extension ifNil: [ extension := #{} ]) at: #commitPathSt ifAbsentPut: [self transport commitPathStFor: self]
+!
+
+commitPathSt: aString
+	^ (extension ifNil: [ extension := #{} ]) at: #commitPathSt put: aString
+!
+
+transport
+	^ PackageHandler for: self transportType
+!
+
+transportType
+	<return (self.transport && self.transport.type) || 'unknown';>
 ! !
 

+ 1 - 4
st/Kernel-Classes.st

@@ -267,10 +267,7 @@ basicAddCompiledMethod: aMethod
 !
 
 basicRemoveCompiledMethod: aMethod
-	<
-		smalltalk.removeMethod(aMethod)
-		smalltalk.init(self);
-	>
+	<smalltalk.removeMethod(aMethod,self)>
 ! !
 
 !Behavior methodsFor: 'testing'!

+ 922 - 0
st/Kernel-Infrastructure.st

@@ -0,0 +1,922 @@
+Smalltalk current createPackage: 'Kernel-Infrastructure'!
+Object subclass: #InspectorHandler
+	instanceVariableNames: ''
+	package: 'Kernel-Infrastructure'!
+!InspectorHandler commentStamp!
+I am responsible for inspecting object.
+
+My class-side `inspector` inst var holds the current inspector I'm delegating object inspection to.
+
+The default inspector object is the transcript.!
+
+InspectorHandler class instanceVariableNames: 'inspector'!
+
+!InspectorHandler class methodsFor: 'accessing'!
+
+inspector
+	^ inspector ifNil: [ inspector := Transcript ]
+! !
+
+!InspectorHandler class methodsFor: 'registration'!
+
+inspect: anObject
+	^ self inspector inspect: anObject
+!
+
+register: anInspector
+	inspector := anInspector
+! !
+
+Object subclass: #InterfacingObject
+	instanceVariableNames: ''
+	package: 'Kernel-Infrastructure'!
+!InterfacingObject commentStamp!
+I am superclass of all object that interface with user or environment. `Widget` and a few other classes are subclasses of me. I delegate all of the above APIs to `PlatformInterface`.
+
+## API
+
+    self alert: 'Hey, there is a problem'.
+    self confirm: 'Affirmative?'.
+    self prompt: 'Your name:'.
+
+    self ajax: #{
+        'url' -> '/patch.js'. 'type' -> 'GET'. dataType->'script'
+    }.!
+
+!InterfacingObject methodsFor: 'actions'!
+
+ajax: anObject
+	^PlatformInterface ajax: anObject
+!
+
+alert: aString
+	^PlatformInterface alert: aString
+!
+
+confirm: aString
+	^PlatformInterface confirm: aString
+!
+
+prompt: aString
+	^PlatformInterface prompt: aString
+! !
+
+InterfacingObject subclass: #Environment
+	instanceVariableNames: ''
+	package: 'Kernel-Infrastructure'!
+!Environment commentStamp!
+I provide an unified entry point to manipulate Amber packages, classes and methods.
+
+Typical use cases include IDEs, remote access and restricting browsing.!
+
+!Environment methodsFor: 'accessing'!
+
+allSelectors
+	^ (Smalltalk current at: 'allSelectors') value
+!
+
+availableClassNames
+	^ Smalltalk current classes 
+		collect: [ :each | each name ]
+!
+
+availablePackageNames
+	^ Smalltalk current packages 
+		collect: [ :each | each name ]
+!
+
+availableProtocolsFor: aClass
+	| protocols |
+	
+	protocols := aClass protocols.
+	aClass superclass ifNotNil: [ protocols addAll: (self availableProtocolsFor: aClass superclass) ].
+	^ protocols asSet asArray
+!
+
+classBuilder
+	^ ClassBuilder new
+!
+
+classNamed: aString
+	^ (Smalltalk current at: aString asSymbol)
+		ifNil: [ self error: 'Invalid class name' ]
+!
+
+classes
+	^ Smalltalk current classes
+!
+
+packages
+	^ Smalltalk current packages
+!
+
+systemAnnouncer
+	^ (Smalltalk current at: #SystemAnnouncer) current
+! !
+
+!Environment methodsFor: 'actions'!
+
+commitPackage: aPackage
+	aPackage commit
+!
+
+copyClass: aClass to: aClassName
+	(Smalltalk current at: aClassName)
+		ifNotNil: [ self error: 'A class named ', aClassName, ' already exists' ].
+		
+	ClassBuilder new copyClass: aClass named: aClassName
+!
+
+eval: aString on: aReceiver
+	| compiler |
+	compiler := Compiler new.
+	[ compiler parseExpression: aString ] on: Error do: [ :ex |
+		^ self alert: ex messageText ].
+	^ compiler evaluateExpression: aString on: aReceiver
+!
+
+inspect: anObject
+	InspectorHandler inspector inspect: anObject
+!
+
+moveClass: aClass toPackage: aPackageName
+	| package |
+	
+	package := Package named: aPackageName.
+	package ifNil: [ self error: 'Invalid package name' ].
+	package == aClass package ifTrue: [ ^ self ].
+	
+	aClass package: package
+!
+
+moveMethod: aMethod toClass: aClassName
+	| destinationClass |
+	
+	destinationClass := Smalltalk current at: aClassName asSymbol.
+	destinationClass ifNil: [ self error: 'Invalid class name' ].
+	destinationClass == aMethod methodClass ifTrue: [ ^ self ].
+	
+	destinationClass 
+		compile: aMethod source
+		category: aMethod protocol.
+	aMethod methodClass 
+		removeCompiledMethod: aMethod
+!
+
+moveMethod: aMethod toProtocol: aProtocol
+	aMethod category: aProtocol
+!
+
+registerErrorHandler: anErrorHandler
+	ErrorHandler setCurrent: anErrorHandler
+!
+
+registerInspector: anInspector
+	InspectorHandler register: anInspector
+!
+
+registerProgressHandler: aProgressHandler
+	ProgressHandler setCurrent: aProgressHandler
+!
+
+removeClass: aClass
+	Smalltalk current removeClass: aClass
+!
+
+removeMethod: aMethod
+	aMethod methodClass removeCompiledMethod: aMethod
+!
+
+removeProtocol: aString from: aClass
+	(aClass methods
+		select: [ :each | each protocol = aString ])
+		do: [ :each | aClass removeCompiledMethod: each ]
+!
+
+renameClass: aClass to: aClassName
+	(Smalltalk current at: aClassName)
+		ifNotNil: [ self error: 'A class named ', aClassName, ' already exists' ].
+		
+	ClassBuilder new renameClass: aClass to: aClassName
+!
+
+renameProtocol: aString to: anotherString in: aClass
+	(aClass methods
+		select: [ :each | each protocol = aString ])
+		do: [ :each | each protocol: anotherString ]
+!
+
+setClassCommentOf: aClass to: aString
+	aClass comment: aString
+! !
+
+!Environment methodsFor: 'compiling'!
+
+addInstVarNamed: aString to: aClass
+	self classBuilder
+		addSubclassOf: aClass superclass 
+		named: aClass name 
+		instanceVariableNames: (aClass instanceVariableNames copy add: aString; yourself)
+		package: aClass package name
+!
+
+compileClassComment: aString for: aClass
+	aClass comment: aString
+!
+
+compileClassDefinition: aString
+	self eval: aString on: DoIt new
+!
+
+compileMethod: sourceCode for: class protocol: protocol
+	^ class
+		compile: sourceCode
+		category: protocol
+! !
+
+!Environment methodsFor: 'error handling'!
+
+evaluate: aBlock on: anErrorClass do: exceptionBlock
+	"Evaluate a block and catch exceptions happening on the environment stack"
+	
+	self try: aBlock catch: [ :exception | 
+		(exception isKindOf: (self classNamed: anErrorClass name))
+			ifTrue: [ exceptionBlock value: exception ]
+ 			ifFalse: [ exception signal ] ]
+! !
+
+Object subclass: #JSObjectProxy
+	instanceVariableNames: 'jsObject'
+	package: 'Kernel-Infrastructure'!
+!JSObjectProxy commentStamp!
+I handle sending messages to JavaScript objects, making  JavaScript object accessing from Amber fully transparent.
+My instances make intensive use of `#doesNotUnderstand:`.
+
+My instances are automatically created by Amber whenever a message is sent to a JavaScript object.
+
+## Usage examples
+
+JSObjectProxy objects are instanciated by Amber when a Smalltalk message is sent to a JavaScript object.
+
+	window alert: 'hello world'.
+	window inspect.
+	(window jQuery: 'body') append: 'hello world'
+
+Amber messages sends are converted to JavaScript function calls or object property access _(in this order)_. If n one of them match, a `MessageNotUnderstood` error will be thrown.
+
+## Message conversion rules
+
+- `someUser name` becomes `someUser.name`
+- `someUser name: 'John'` becomes `someUser name = "John"`
+- `console log: 'hello world'` becomes `console.log('hello world')`
+- `(window jQuery: 'foo') css: 'background' color: 'red'` becomes `window.jQuery('foo').css('background', 'red')`
+
+__Note:__ For keyword-based messages, only the first keyword is kept: `window foo: 1 bar: 2` is equivalent to `window foo: 1 baz: 2`.!
+
+!JSObjectProxy methodsFor: 'accessing'!
+
+at: aString
+	<return self['@jsObject'][aString]>
+!
+
+at: aString ifAbsent: aBlock
+	"return the aString property or evaluate aBlock if the property is not defined on the object"
+	<
+		var obj = self['@jsObject'];
+		return aString in obj ? obj[aString] : aBlock._value();
+	>
+!
+
+at: aString ifPresent: aBlock
+	"return the evaluation of aBlock with the value if the property is defined or return nil"
+	<
+		var obj = self['@jsObject'];
+		return aString in obj ? aBlock._value_(obj[aString]) : nil;
+	>
+!
+
+at: aString ifPresent: aBlock ifAbsent: anotherBlock
+	"return the evaluation of aBlock with the value if the property is defined
+	or return value of anotherBlock"
+	<
+		var obj = self['@jsObject'];
+		return aString in obj ? aBlock._value_(obj[aString]) : anotherBlock._value();
+	>
+!
+
+at: aString put: anObject
+	<self['@jsObject'][aString] = anObject>
+!
+
+jsObject
+	^jsObject
+!
+
+jsObject: aJSObject
+	jsObject := aJSObject
+!
+
+lookupProperty: aString
+	"Looks up a property in JS object.
+	Answer the property if it is present, or nil if it is not present."
+	
+	<return aString in self._jsObject() ? aString : nil>
+!
+
+value
+	"if attribute 'value' exists on the JS object return it,
+	otherwise return the result of Object>>value."
+	
+	^ self 
+		at: 'value' 
+		ifAbsent: [ super value ]
+! !
+
+!JSObjectProxy methodsFor: 'enumerating'!
+
+keysAndValuesDo: aBlock
+	<
+		var o = self['@jsObject'];
+		for(var i in o) {
+			aBlock._value_value_(i, o[i]);
+		}
+	>
+! !
+
+!JSObjectProxy methodsFor: 'printing'!
+
+printOn: aStream
+	aStream nextPutAll: self jsObject toString
+! !
+
+!JSObjectProxy methodsFor: 'proxy'!
+
+addObjectVariablesTo: aDictionary
+	<
+		for(var i in self['@jsObject']) {
+			aDictionary._at_put_(i, self['@jsObject'][i]);
+		}
+	>
+!
+
+doesNotUnderstand: aMessage
+	^ (self lookupProperty: aMessage selector asJavaScriptSelector)
+		ifNil: [ super doesNotUnderstand: aMessage ]
+		ifNotNil: [ :jsSelector | 
+			self 
+				forwardMessage: jsSelector 
+				withArguments: aMessage arguments ]
+!
+
+forwardMessage: aString withArguments: anArray
+	<
+		return smalltalk.send(self._jsObject(), aString, anArray);
+	>
+!
+
+inspectOn: anInspector
+	| variables |
+	variables := Dictionary new.
+	variables at: '#self' put: self jsObject.
+	anInspector setLabel: self printString.
+	self addObjectVariablesTo: variables.
+	anInspector setVariables: variables
+! !
+
+!JSObjectProxy class methodsFor: 'instance creation'!
+
+on: aJSObject
+	^self new
+		jsObject: aJSObject;
+		yourself
+! !
+
+Object subclass: #Organizer
+	instanceVariableNames: ''
+	package: 'Kernel-Infrastructure'!
+!Organizer commentStamp!
+I represent categorization information. 
+
+## API
+
+Use `#addElement:` and `#removeElement:` to manipulate instances.!
+
+!Organizer methodsFor: 'accessing'!
+
+addElement: anObject
+	<self.elements.addElement(anObject)>
+!
+
+elements
+	^ (self basicAt: 'elements') copy
+!
+
+removeElement: anObject
+	<self.elements.removeElement(anObject)>
+! !
+
+Organizer subclass: #ClassOrganizer
+	instanceVariableNames: ''
+	package: 'Kernel-Infrastructure'!
+!ClassOrganizer commentStamp!
+I am an organizer specific to classes. I hold method categorization information for classes.!
+
+!ClassOrganizer methodsFor: 'accessing'!
+
+addElement: aString
+	super addElement: aString.
+
+	SystemAnnouncer current announce: (ProtocolAdded new
+		protocol: aString;
+		theClass: self theClass;
+		yourself)
+!
+
+removeElement: aString
+	super removeElement: aString.
+
+	SystemAnnouncer current announce: (ProtocolRemoved new
+		protocol: aString;
+		theClass: self theClass;
+		yourself)
+!
+
+theClass
+	< return self.theClass >
+! !
+
+Organizer subclass: #PackageOrganizer
+	instanceVariableNames: ''
+	package: 'Kernel-Infrastructure'!
+!PackageOrganizer commentStamp!
+I am an organizer specific to packages. I hold classes categorization information.!
+
+Object subclass: #Package
+	instanceVariableNames: 'extension'
+	package: 'Kernel-Infrastructure'!
+!Package commentStamp!
+I am similar to a "class category" typically found in other Smalltalks like Pharo or Squeak. Amber does not have class categories anymore, it had in the beginning but now each class in the system knows which package it belongs to.
+
+Each package has a name and can be queried for its classes, but it will then resort to a reverse scan of all classes to find them.
+
+## API
+
+Packages are manipulated through "Smalltalk current", like for example finding one based on a name or with `Package class >> #name` directly:
+
+    Smalltalk current packageAt: 'Kernel'
+    Package named: 'Kernel'
+
+A package differs slightly from a Monticello package which can span multiple class categories using a naming convention based on hyphenation. But just as in Monticello a package supports "class extensions" so a package can define behaviors in foreign classes using a naming convention for method categories where the category starts with an asterisk and then the name of the owning package follows.
+
+You can fetch a package from the server:
+
+	Package load: 'Additional-Examples'!
+
+!Package methodsFor: 'accessing'!
+
+name
+	<return self.pkgName>
+!
+
+name: aString
+	<self.pkgName = aString>
+!
+
+organization
+	^ self basicAt: 'organization'
+! !
+
+!Package methodsFor: 'classes'!
+
+classes
+	^ self organization elements
+!
+
+setupClasses
+	self classes
+		do: [ :each | ClassBuilder new setupClass: each ];
+		do: [ :each | each initialize ]
+!
+
+sortedClasses
+	"Answer all classes in the receiver, sorted by superclass/subclasses and by class name for common subclasses (Issue #143)."
+
+	^self class sortedClasses: self classes
+! !
+
+!Package methodsFor: 'dependencies'!
+
+loadDependencies
+	"Returns list of packages that need to be loaded
+	before loading this package."
+	
+	| classes packages |
+	classes := self loadDependencyClasses.
+	^(classes collect: [ :each | each package ]) asSet
+		remove: self ifAbsent: [];
+		yourself
+!
+
+loadDependencyClasses
+	"Returns classes needed at the time of loading a package.
+	These are all that are used to subclass
+	and to define an extension method"
+	
+	| starCategoryName |
+	starCategoryName := '*', self name.
+	^(self classes collect: [ :each | each superclass ]) asSet
+		remove: nil ifAbsent: [];
+		addAll: (Smalltalk current classes select: [ :each | each protocols includes: starCategoryName ]);
+		yourself
+! !
+
+!Package methodsFor: 'printing'!
+
+printOn: aStream
+	super printOn: aStream.
+	aStream 
+		nextPutAll: ' (';
+		nextPutAll: self name;
+		nextPutAll: ')'
+! !
+
+!Package methodsFor: 'testing'!
+
+isPackage
+	^ true
+! !
+
+Package class instanceVariableNames: 'defaultCommitPathJs defaultCommitPathSt'!
+
+!Package class methodsFor: 'accessing'!
+
+named: aPackageName
+
+	^Smalltalk current packageAt: aPackageName
+!
+
+named: aPackageName ifAbsent: aBlock
+
+	^Smalltalk current packageAt: aPackageName ifAbsent: aBlock
+! !
+
+!Package class methodsFor: 'loading-storing'!
+
+load: aPackageName
+	self deprecatedAPI.
+	self load: aPackageName prefix: self defaultCommitPathJs, '/'
+!
+
+load: aPackageName prefix: aPrefix
+	self deprecatedAPI.
+	PlatformInterface ajax: #{
+		'url' -> (aPrefix , aPackageName , '.js').
+		'dataType' -> 'script'.
+		'success' -> [
+			(Package named: aPackageName) setupClasses ]
+	}
+! !
+
+!Package class methodsFor: 'sorting'!
+
+sortedClasses: classes
+	"Answer classes, sorted by superclass/subclasses and by class name for common subclasses (Issue #143)"
+
+	| children others nodes expandedClasses |
+	children := #().
+	others := #().
+	classes do: [:each |
+		(classes includes: each superclass)
+			ifFalse: [children add: each]
+			ifTrue: [others add: each]].
+	nodes := children collect: [:each |
+		ClassSorterNode on: each classes: others level: 0].
+	nodes := nodes sorted: [:a :b | a theClass name <= b theClass name ].
+	expandedClasses := Array new.
+	nodes do: [:aNode |
+		aNode traverseClassesWith: expandedClasses].
+	^expandedClasses
+! !
+
+Object subclass: #PlatformInterface
+	instanceVariableNames: ''
+	package: 'Kernel-Infrastructure'!
+!PlatformInterface commentStamp!
+I am single entry point to UI and environment interface.
+My `initialize` tries several options (for now, browser environment only) to set myself up.
+
+## API
+
+    PlatformInterface alert: 'Hey, there is a problem'.
+    PlatformInterface confirm: 'Affirmative?'.
+    PlatformInterface prompt: 'Your name:'.
+
+    PlatformInterface ajax: #{
+        'url' -> '/patch.js'. 'type' -> 'GET'. dataType->'script'
+    }.!
+
+PlatformInterface class instanceVariableNames: 'worker'!
+
+!PlatformInterface class methodsFor: 'accessing'!
+
+setWorker: anObject
+	worker := anObject
+! !
+
+!PlatformInterface class methodsFor: 'actions'!
+
+ajax: anObject
+	^worker
+		ifNotNil: [ worker ajax: anObject ]
+		ifNil: [ self error: 'ajax: not available' ]
+!
+
+alert: aString
+	^worker
+		ifNotNil: [ worker alert: aString ]
+		ifNil: [ self error: 'alert: not available' ]
+!
+
+confirm: aString
+	^worker
+		ifNotNil: [ worker confirm: aString ]
+		ifNil: [ self error: 'confirm: not available' ]
+!
+
+existsGlobal: aString
+<
+	var f = new Function('aString',
+	'if (/^[0-9]/.test(aString) || !!/^[\\w_]+$/.test(aString))\n'+
+	'	return false;\n'+
+	'try { eval(aString); return true; } catch (ex) {}\n'+
+	'return false;');
+	return f(aString);
+>
+!
+
+prompt: aString
+	^worker
+		ifNotNil: [ worker prompt: aString ]
+		ifNil: [ self error: 'prompt: not available' ]
+! !
+
+!PlatformInterface class methodsFor: 'initialization'!
+
+initialize
+	| candidate |
+	
+	super initialize.
+	
+	BrowserInterface ifNotNil: [
+		candidate := BrowserInterface new.
+		candidate isAvailable ifTrue: [ self setWorker: candidate. ^self ]
+	]
+! !
+
+Object subclass: #ProgressHandler
+	instanceVariableNames: ''
+	package: 'Kernel-Infrastructure'!
+!ProgressHandler commentStamp!
+I am used to manage progress in collection iterations, see `SequenceableCollection >> #do:displayingProgress:`.
+
+Subclasses of can register themselves as the current handler with
+`ProgressHandler class >> register`.
+
+The default behavior is to simply iterate over the collection.!
+
+!ProgressHandler methodsFor: 'progress handling'!
+
+do: aBlock on: aCollection displaying: aString
+	aCollection do: aBlock
+! !
+
+ProgressHandler class instanceVariableNames: 'current'!
+
+!ProgressHandler class methodsFor: 'accessing'!
+
+current
+	^current ifNil: [ current := self new ]
+!
+
+setCurrent: anHandler
+	current := anHandler
+! !
+
+!ProgressHandler class methodsFor: 'initialization'!
+
+initialize
+	self register
+!
+
+register
+	ProgressHandler setCurrent: self new
+! !
+
+Object subclass: #Smalltalk
+	instanceVariableNames: ''
+	package: 'Kernel-Infrastructure'!
+!Smalltalk commentStamp!
+I represent the global JavaScript variable `smalltalk` declared in `js/boot.js`.
+
+## API
+
+I have only one instance, accessed with class-side method `#current`.
+
+The `smalltalk` object holds all class and packages defined in the system.
+
+## Classes
+
+Classes can be accessed using the following methods:
+
+- `#classes` answers the full list of Smalltalk classes in the system
+- `#at:` answers a specific class or `nil`
+
+## Packages
+
+Packages can be accessed using the following methods:
+
+- `#packages` answers the full list of packages
+- `#packageAt:` answers a specific package or `nil`
+
+## Parsing
+
+The `#parse:` method is used to parse Amber source code.
+It requires the `Compiler` package and the `js/parser.js` parser file in order to work.!
+
+!Smalltalk methodsFor: 'accessing'!
+
+at: aString
+	<return self[aString]>
+!
+
+parse: aString
+	| result |
+	
+	self 
+		try: [result := self basicParse: aString] 
+		catch: [:ex | (self parseError: ex parsing: aString) signal].
+		
+	^ result
+		source: aString;
+		yourself
+!
+
+readJSObject: anObject
+	<return self.readJSObject(anObject)>
+!
+
+reservedWords
+	"JavaScript reserved words"
+	<return self.reservedWords>
+!
+
+version
+	"Answer the version string of Amber"
+	
+	^ '0.11.0'
+! !
+
+!Smalltalk methodsFor: 'classes'!
+
+classes
+	<return self.classes()>
+!
+
+deleteClass: aClass
+	"Deletes a class by deleting its binding only. Use #removeClass instead"
+	
+	<self.removeClass(aClass)>
+!
+
+removeClass: aClass
+	aClass isMetaclass ifTrue: [self error: aClass asString, ' is a Metaclass and cannot be removed!!'].
+	
+	self deleteClass: aClass.
+	
+	SystemAnnouncer current
+		announce: (ClassRemoved new
+			theClass: aClass;
+			yourself)
+! !
+
+!Smalltalk methodsFor: 'error handling'!
+
+asSmalltalkException: anObject
+	"A JavaScript exception may be thrown.
+	We then need to convert it back to a Smalltalk object"
+	
+	^ ((self isSmalltalkObject: anObject) and: [ anObject isKindOf: Error ])
+		ifTrue: [ anObject ]
+		ifFalse: [ JavaScriptException on: anObject ]
+!
+
+parseError: anException parsing: aString
+	^ ParseError new messageText: 'Parse error on line ', (anException basicAt: 'line') ,' column ' , (anException basicAt: 'column') ,' : Unexpected character ', (anException basicAt: 'found')
+! !
+
+!Smalltalk methodsFor: 'globals'!
+
+addGlobalJsVariable: aString
+	self globalJsVariables add: aString
+!
+
+deleteGlobalJsVariable: aString
+	self globalJsVariables remove: aString ifAbsent:[]
+!
+
+globalJsVariables
+	"Array of global JavaScript variables"
+	<return self.globalJsVariables>
+! !
+
+!Smalltalk methodsFor: 'packages'!
+
+createPackage: packageName
+	"Create and bind a new package with given name and return it."
+	<return smalltalk.addPackage(packageName)>
+!
+
+deletePackage: packageName
+	"Deletes a package by deleting its binding, but does not check if it contains classes etc.
+	To remove a package, use #removePackage instead."
+
+	<delete smalltalk.packages[packageName]>
+!
+
+packageAt: packageName
+	<return self.packages[packageName]>
+!
+
+packageAt: packageName ifAbsent: aBlock
+	^(self packageAt: packageName) ifNil: aBlock
+!
+
+packages
+	"Return all Package instances in the system."
+
+	<return self.packages.all()>
+!
+
+pseudoVariableNames
+	^ #('self' 'super' 'nil' 'true' 'false' 'thisContext')
+!
+
+removePackage: packageName
+	"Removes a package and all its classes."
+
+	| pkg |
+	pkg := self packageAt: packageName ifAbsent: [self error: 'Missing package: ', packageName].
+	pkg classes do: [:each |
+			self removeClass: each].
+	self deletePackage: packageName
+!
+
+renamePackage: packageName to: newName
+	"Rename a package."
+
+	| pkg |
+	pkg := self packageAt: packageName ifAbsent: [self error: 'Missing package: ', packageName].
+	(self packageAt: newName) ifNotNil: [self error: 'Already exists a package called: ', newName].
+	(self basicAt: 'packages') at: newName put: pkg.
+	pkg name: newName.
+	self deletePackage: packageName.
+! !
+
+!Smalltalk methodsFor: 'private'!
+
+basicParse: aString
+	<return smalltalk.parser.parse(aString)>
+!
+
+createPackage: packageName properties: aDict
+	"Needed to import .st files: they begin with this call."
+	self deprecatedAPI.
+	
+	aDict isEmpty ifFalse: [ self error: 'createPackage:properties: called with nonempty properties' ].
+	^ self createPackage: packageName
+! !
+
+!Smalltalk methodsFor: 'testing'!
+
+isSmalltalkObject: anObject
+	"Consider anObject a Smalltalk object if it has a 'klass' property.
+	Note that this may be unaccurate"
+	
+	<return typeof anObject.klass !!== 'undefined'>
+! !
+
+Smalltalk class instanceVariableNames: 'current'!
+
+!Smalltalk class methodsFor: 'accessing'!
+
+current
+	<return smalltalk>
+! !
+
+!String methodsFor: '*Kernel-Infrastructure'!
+
+asJavaScriptSelector
+	"Return first keyword of the selector, without trailing colon."
+	^self replace: '^([a-zA-Z0-9]*).*$' with: '$1'
+! !
+

+ 37 - 5
st/Kernel-Methods.st

@@ -690,12 +690,44 @@ constructor: aString value:anObject value: anObject2 value:anObject3
 !NativeFunction class methodsFor: 'testing'!
 
 exists: aString
+	^PlatformInterface existsGlobal: aString
+! !
+
+Object subclass: #Timeout
+	instanceVariableNames: 'rawTimeout'
+	package: 'Kernel-Methods'!
+!Timeout commentStamp!
+I am wrapping the returns from `set{Timeout,Interval}`.
+
+## Motivation
+
+Number suffices in browsers, but node.js returns an object.!
+
+!Timeout methodsFor: 'accessing'!
+
+rawTimeout: anObject
+	rawTimeout := anObject
+! !
+
+!Timeout methodsFor: 'timeout/interval'!
+
+clearInterval
 	<
-		if(aString in window) {
-			return true
-		} else {
-			return false
-		}
+		var interval = self["@rawTimeout"];
+		clearInterval(interval);
 	>
+!
+
+clearTimeout
+	<
+		var timeout = self["@rawTimeout"];
+		clearTimeout(timeout);
+	>
+! !
+
+!Timeout class methodsFor: 'instance creation'!
+
+on: anObject
+	^self new rawTimeout: anObject; yourself
 ! !
 

+ 0 - 875
st/Kernel-Objects.st

@@ -708,364 +708,6 @@ today
 	^self new
 ! !
 
-Object subclass: #Environment
-	instanceVariableNames: ''
-	package: 'Kernel-Objects'!
-!Environment commentStamp!
-I provide an unified entry point to manipulate Amber packages, classes and methods.
-
-Typical use cases include IDEs, remote access and restricting browsing.!
-
-!Environment methodsFor: 'accessing'!
-
-allSelectors
-	^ (Smalltalk current at: 'allSelectors') value
-!
-
-availableClassNames
-	^ Smalltalk current classes 
-		collect: [ :each | each name ]
-!
-
-availablePackageNames
-	^ Smalltalk current packages 
-		collect: [ :each | each name ]
-!
-
-availableProtocolsFor: aClass
-	| protocols |
-	
-	protocols := aClass protocols.
-	aClass superclass ifNotNil: [ protocols addAll: (self availableProtocolsFor: aClass superclass) ].
-	^ protocols asSet asArray
-!
-
-classBuilder
-	^ ClassBuilder new
-!
-
-classNamed: aString
-	^ (Smalltalk current at: aString asSymbol)
-		ifNil: [ self error: 'Invalid class name' ]
-!
-
-classes
-	^ Smalltalk current classes
-!
-
-packages
-	^ Smalltalk current packages
-!
-
-systemAnnouncer
-	^ (Smalltalk current at: #SystemAnnouncer) current
-! !
-
-!Environment methodsFor: 'actions'!
-
-commitPackage: aPackage
-	aPackage commit
-!
-
-copyClass: aClass to: aClassName
-	(Smalltalk current at: aClassName)
-		ifNotNil: [ self error: 'A class named ', aClassName, ' already exists' ].
-		
-	ClassBuilder new copyClass: aClass named: aClassName
-!
-
-eval: aString on: aReceiver
-	| compiler |
-	compiler := Compiler new.
-	[ compiler parseExpression: aString ] on: Error do: [ :ex |
-		^ window alert: ex messageText ].
-	^ compiler evaluateExpression: aString on: aReceiver
-!
-
-inspect: anObject
-	InspectorHandler inspector inspect: anObject
-!
-
-moveClass: aClass toPackage: aPackageName
-	| package |
-	
-	package := Package named: aPackageName.
-	package ifNil: [ self error: 'Invalid package name' ].
-	package == aClass package ifTrue: [ ^ self ].
-	
-	aClass package: package
-!
-
-moveMethod: aMethod toClass: aClassName
-	| destinationClass |
-	
-	destinationClass := Smalltalk current at: aClassName asSymbol.
-	destinationClass ifNil: [ self error: 'Invalid class name' ].
-	destinationClass == aMethod methodClass ifTrue: [ ^ self ].
-	
-	destinationClass 
-		compile: aMethod source
-		category: aMethod protocol.
-	aMethod methodClass 
-		removeCompiledMethod: aMethod
-!
-
-moveMethod: aMethod toProtocol: aProtocol
-	aMethod category: aProtocol
-!
-
-registerErrorHandler: anErrorHandler
-	ErrorHandler setCurrent: anErrorHandler
-!
-
-registerInspector: anInspector
-	InspectorHandler register: anInspector
-!
-
-registerProgressHandler: aProgressHandler
-	ProgressHandler setCurrent: aProgressHandler
-!
-
-removeClass: aClass
-	Smalltalk current removeClass: aClass
-!
-
-removeMethod: aMethod
-	aMethod methodClass removeCompiledMethod: aMethod
-!
-
-removeProtocol: aString from: aClass
-	(aClass methods
-		select: [ :each | each protocol = aString ])
-		do: [ :each | aClass removeCompiledMethod: each ]
-!
-
-renameClass: aClass to: aClassName
-	(Smalltalk current at: aClassName)
-		ifNotNil: [ self error: 'A class named ', aClassName, ' already exists' ].
-		
-	ClassBuilder new renameClass: aClass to: aClassName
-!
-
-renameProtocol: aString to: anotherString in: aClass
-	(aClass methods
-		select: [ :each | each protocol = aString ])
-		do: [ :each | each protocol: anotherString ]
-!
-
-setClassCommentOf: aClass to: aString
-	aClass comment: aString
-! !
-
-!Environment methodsFor: 'compiling'!
-
-addInstVarNamed: aString to: aClass
-	self classBuilder
-		addSubclassOf: aClass superclass 
-		named: aClass name 
-		instanceVariableNames: (aClass instanceVariableNames copy add: aString; yourself)
-		package: aClass package name
-!
-
-compileClassComment: aString for: aClass
-	aClass comment: aString
-!
-
-compileClassDefinition: aString
-	self eval: aString on: DoIt new
-!
-
-compileMethod: sourceCode for: class protocol: protocol
-	^ class
-		compile: sourceCode
-		category: protocol
-! !
-
-!Environment methodsFor: 'error handling'!
-
-evaluate: aBlock on: anErrorClass do: exceptionBlock
-	"Evaluate a block and catch exceptions happening on the environment stack"
-	
-	self try: aBlock catch: [ :exception | 
-		(exception isKindOf: (self classNamed: anErrorClass name))
-			ifTrue: [ exceptionBlock value: exception ]
- 			ifFalse: [ exception signal ] ]
-! !
-
-Object subclass: #InspectorHandler
-	instanceVariableNames: ''
-	package: 'Kernel-Objects'!
-!InspectorHandler commentStamp!
-I am responsible for inspecting object.
-
-My class-side `inspector` inst var holds the current inspector I'm delegating object inspection to.
-
-The default inspector object is the transcript.!
-
-InspectorHandler class instanceVariableNames: 'inspector'!
-
-!InspectorHandler class methodsFor: 'accessing'!
-
-inspector
-	^ inspector ifNil: [ inspector := Transcript ]
-! !
-
-!InspectorHandler class methodsFor: 'registration'!
-
-inspect: anObject
-	^ self inspector inspect: anObject
-!
-
-register: anInspector
-	inspector := anInspector
-! !
-
-Object subclass: #JSObjectProxy
-	instanceVariableNames: 'jsObject'
-	package: 'Kernel-Objects'!
-!JSObjectProxy commentStamp!
-I handle sending messages to JavaScript objects, making  JavaScript object accessing from Amber fully transparent.
-My instances make intensive use of `#doesNotUnderstand:`.
-
-My instances are automatically created by Amber whenever a message is sent to a JavaScript object.
-
-## Usage examples
-
-JSObjectProxy objects are instanciated by Amber when a Smalltalk message is sent to a JavaScript object.
-
-	window alert: 'hello world'.
-	window inspect.
-	(window jQuery: 'body') append: 'hello world'
-
-Amber messages sends are converted to JavaScript function calls or object property access _(in this order)_. If n one of them match, a `MessageNotUnderstood` error will be thrown.
-
-## Message conversion rules
-
-- `someUser name` becomes `someUser.name`
-- `someUser name: 'John'` becomes `someUser name = "John"`
-- `console log: 'hello world'` becomes `console.log('hello world')`
-- `(window jQuery: 'foo') css: 'background' color: 'red'` becomes `window.jQuery('foo').css('background', 'red')`
-
-__Note:__ For keyword-based messages, only the first keyword is kept: `window foo: 1 bar: 2` is equivalent to `window foo: 1 baz: 2`.!
-
-!JSObjectProxy methodsFor: 'accessing'!
-
-at: aString
-	<return self['@jsObject'][aString]>
-!
-
-at: aString ifAbsent: aBlock
-	"return the aString property or evaluate aBlock if the property is not defined on the object"
-	<
-		var obj = self['@jsObject'];
-		return aString in obj ? obj[aString] : aBlock._value();
-	>
-!
-
-at: aString ifPresent: aBlock
-	"return the evaluation of aBlock with the value if the property is defined or return nil"
-	<
-		var obj = self['@jsObject'];
-		return aString in obj ? aBlock._value_(obj[aString]) : nil;
-	>
-!
-
-at: aString ifPresent: aBlock ifAbsent: anotherBlock
-	"return the evaluation of aBlock with the value if the property is defined
-	or return value of anotherBlock"
-	<
-		var obj = self['@jsObject'];
-		return aString in obj ? aBlock._value_(obj[aString]) : anotherBlock._value();
-	>
-!
-
-at: aString put: anObject
-	<self['@jsObject'][aString] = anObject>
-!
-
-jsObject
-	^jsObject
-!
-
-jsObject: aJSObject
-	jsObject := aJSObject
-!
-
-lookupProperty: aString
-	"Looks up a property in JS object.
-	Answer the property if it is present, or nil if it is not present."
-	
-	<return aString in self._jsObject() ? aString : nil>
-!
-
-value
-	"if attribute 'value' exists on the JS object return it,
-	otherwise return the result of Object>>value."
-	
-	^ self 
-		at: 'value' 
-		ifAbsent: [ super value ]
-! !
-
-!JSObjectProxy methodsFor: 'enumerating'!
-
-keysAndValuesDo: aBlock
-	<
-		var o = self['@jsObject'];
-		for(var i in o) {
-			aBlock._value_value_(i, o[i]);
-		}
-	>
-! !
-
-!JSObjectProxy methodsFor: 'printing'!
-
-printOn: aStream
-	aStream nextPutAll: self jsObject toString
-! !
-
-!JSObjectProxy methodsFor: 'proxy'!
-
-addObjectVariablesTo: aDictionary
-	<
-		for(var i in self['@jsObject']) {
-			aDictionary._at_put_(i, self['@jsObject'][i]);
-		}
-	>
-!
-
-doesNotUnderstand: aMessage
-	^ (self lookupProperty: aMessage selector asJavaScriptSelector)
-		ifNil: [ super doesNotUnderstand: aMessage ]
-		ifNotNil: [ :jsSelector | 
-			self 
-				forwardMessage: jsSelector 
-				withArguments: aMessage arguments ]
-!
-
-forwardMessage: aString withArguments: anArray
-	<
-		return smalltalk.send(self._jsObject(), aString, anArray);
-	>
-!
-
-inspectOn: anInspector
-	| variables |
-	variables := Dictionary new.
-	variables at: '#self' put: self jsObject.
-	anInspector setLabel: self printString.
-	self addObjectVariablesTo: variables.
-	anInspector setVariables: variables
-! !
-
-!JSObjectProxy class methodsFor: 'instance creation'!
-
-on: aJSObject
-	^self new
-		jsObject: aJSObject;
-		yourself
-! !
-
 Object subclass: #Number
 	instanceVariableNames: ''
 	package: 'Kernel-Objects'!
@@ -1350,238 +992,6 @@ pi
 	<return Math.PI>
 ! !
 
-Object subclass: #Organizer
-	instanceVariableNames: ''
-	package: 'Kernel-Objects'!
-!Organizer commentStamp!
-I represent categorization information. 
-
-## API
-
-Use `#addElement:` and `#removeElement:` to manipulate instances.!
-
-!Organizer methodsFor: 'accessing'!
-
-addElement: anObject
-	<self.elements.addElement(anObject)>
-!
-
-elements
-	^ (self basicAt: 'elements') copy
-!
-
-removeElement: anObject
-	<self.elements.removeElement(anObject)>
-! !
-
-Organizer subclass: #ClassOrganizer
-	instanceVariableNames: ''
-	package: 'Kernel-Objects'!
-!ClassOrganizer commentStamp!
-I am an organizer specific to classes. I hold method categorization information for classes.!
-
-!ClassOrganizer methodsFor: 'accessing'!
-
-addElement: aString
-	super addElement: aString.
-
-	SystemAnnouncer current announce: (ProtocolAdded new
-		protocol: aString;
-		theClass: self theClass;
-		yourself)
-!
-
-removeElement: aString
-	super removeElement: aString.
-
-	SystemAnnouncer current announce: (ProtocolRemoved new
-		protocol: aString;
-		theClass: self theClass;
-		yourself)
-!
-
-theClass
-	< return self.theClass >
-! !
-
-Organizer subclass: #PackageOrganizer
-	instanceVariableNames: ''
-	package: 'Kernel-Objects'!
-!PackageOrganizer commentStamp!
-I am an organizer specific to packages. I hold classes categorization information.!
-
-Object subclass: #Package
-	instanceVariableNames: 'commitPathJs commitPathSt'
-	package: 'Kernel-Objects'!
-!Package commentStamp!
-I am similar to a "class category" typically found in other Smalltalks like Pharo or Squeak. Amber does not have class categories anymore, it had in the beginning but now each class in the system knows which package it belongs to.
-
-Each package has a name and can be queried for its classes, but it will then resort to a reverse scan of all classes to find them.
-
-## API
-
-Packages are manipulated through "Smalltalk current", like for example finding one based on a name or with `Package class >> #name` directly:
-
-    Smalltalk current packageAt: 'Kernel'
-    Package named: 'Kernel'
-
-A package differs slightly from a Monticello package which can span multiple class categories using a naming convention based on hyphenation. But just as in Monticello a package supports "class extensions" so a package can define behaviors in foreign classes using a naming convention for method categories where the category starts with an asterisk and then the name of the owning package follows.
-
-You can fetch a package from the server:
-
-	Package load: 'Additional-Examples'!
-
-!Package methodsFor: 'accessing'!
-
-commitPathJs
-	^ commitPathJs ifNil: [self class defaultCommitPathJs]
-!
-
-commitPathJs: aString
-	commitPathJs := aString
-!
-
-commitPathSt
-	^ commitPathSt ifNil: [self class defaultCommitPathSt]
-!
-
-commitPathSt: aString
-	commitPathSt := aString
-!
-
-name
-	<return self.pkgName>
-!
-
-name: aString
-	<self.pkgName = aString>
-!
-
-organization
-	^ self basicAt: 'organization'
-! !
-
-!Package methodsFor: 'classes'!
-
-classes
-	^ self organization elements
-!
-
-setupClasses
-	self classes
-		do: [ :each | ClassBuilder new setupClass: each ];
-		do: [ :each | each initialize ]
-!
-
-sortedClasses
-	"Answer all classes in the receiver, sorted by superclass/subclasses and by class name for common subclasses (Issue #143)."
-
-	^self class sortedClasses: self classes
-! !
-
-!Package methodsFor: 'printing'!
-
-printOn: aStream
-	super printOn: aStream.
-	aStream 
-		nextPutAll: ' (';
-		nextPutAll: self name;
-		nextPutAll: ')'
-! !
-
-!Package methodsFor: 'testing'!
-
-isPackage
-	^ true
-! !
-
-Package class instanceVariableNames: 'defaultCommitPathJs defaultCommitPathSt'!
-
-!Package class methodsFor: 'accessing'!
-
-named: aPackageName
-
-	^Smalltalk current packageAt: aPackageName
-!
-
-named: aPackageName ifAbsent: aBlock
-
-	^Smalltalk current packageAt: aPackageName ifAbsent: aBlock
-! !
-
-!Package class methodsFor: 'commit paths'!
-
-commitPathsFromLoader
-	<
-		var commitPath = typeof amber !!== 'undefined' && amber.commitPath;
-		if (!!commitPath) return;
-		if (commitPath.js) self._defaultCommitPathJs_(commitPath.js);
-		if (commitPath.st) self._defaultCommitPathSt_(commitPath.st);
-	>
-!
-
-defaultCommitPathJs
-	^ defaultCommitPathJs ifNil: [ defaultCommitPathJs := 'js']
-!
-
-defaultCommitPathJs: aString
-	defaultCommitPathJs := aString
-!
-
-defaultCommitPathSt
-	^ defaultCommitPathSt ifNil: [ defaultCommitPathSt := 'st']
-!
-
-defaultCommitPathSt: aString
-	defaultCommitPathSt := aString
-!
-
-resetCommitPaths
-		defaultCommitPathJs := nil.
-		defaultCommitPathSt := nil.
-! !
-
-!Package class methodsFor: 'initialization'!
-
-initialize
-	super initialize.
-	self commitPathsFromLoader
-! !
-
-!Package class methodsFor: 'loading-storing'!
-
-load: aPackageName
-	self load: aPackageName prefix: self defaultCommitPathJs, '/'
-!
-
-load: aPackageName prefix: aPrefix
-	jQuery
-		getScript: (aPrefix , aPackageName , '.js')
-		onSuccess: [
-			(Package named: aPackageName) setupClasses ]
-! !
-
-!Package class methodsFor: 'sorting'!
-
-sortedClasses: classes
-	"Answer classes, sorted by superclass/subclasses and by class name for common subclasses (Issue #143)"
-
-	| children others nodes expandedClasses |
-	children := #().
-	others := #().
-	classes do: [:each |
-		(classes includes: each superclass)
-			ifFalse: [children add: each]
-			ifTrue: [others add: each]].
-	nodes := children collect: [:each |
-		ClassSorterNode on: each classes: others level: 0].
-	nodes := nodes sorted: [:a :b | a theClass name <= b theClass name ].
-	expandedClasses := Array new.
-	nodes do: [:aNode |
-		aNode traverseClassesWith: expandedClasses].
-	^expandedClasses
-! !
-
 Object subclass: #Point
 	instanceVariableNames: 'x y'
 	package: 'Kernel-Objects'!
@@ -1690,45 +1100,6 @@ x: aNumber y: anotherNumber
 		yourself
 ! !
 
-Object subclass: #ProgressHandler
-	instanceVariableNames: ''
-	package: 'Kernel-Objects'!
-!ProgressHandler commentStamp!
-I am used to manage progress in collection iterations, see `SequenceableCollection >> #do:displayingProgress:`.
-
-Subclasses of can register themselves as the current handler with
-`ProgressHandler class >> register`.
-
-The default behavior is to simply iterate over the collection.!
-
-!ProgressHandler methodsFor: 'progress handling'!
-
-do: aBlock on: aCollection displaying: aString
-	aCollection do: aBlock
-! !
-
-ProgressHandler class instanceVariableNames: 'current'!
-
-!ProgressHandler class methodsFor: 'accessing'!
-
-current
-	^current ifNil: [ current := self new ]
-!
-
-setCurrent: anHandler
-	current := anHandler
-! !
-
-!ProgressHandler class methodsFor: 'initialization'!
-
-initialize
-	self register
-!
-
-register
-	ProgressHandler setCurrent: self new
-! !
-
 Object subclass: #Random
 	instanceVariableNames: ''
 	package: 'Kernel-Objects'!
@@ -1773,245 +1144,6 @@ next: anInteger
 	^(1 to: anInteger) collect: [:each | self next]
 ! !
 
-Object subclass: #Smalltalk
-	instanceVariableNames: ''
-	package: 'Kernel-Objects'!
-!Smalltalk commentStamp!
-I represent the global JavaScript variable `smalltalk` declared in `js/boot.js`.
-
-## API
-
-I have only one instance, accessed with class-side method `#current`.
-
-The `smalltalk` object holds all class and packages defined in the system.
-
-## Classes
-
-Classes can be accessed using the following methods:
-
-- `#classes` answers the full list of Smalltalk classes in the system
-- `#at:` answers a specific class or `nil`
-
-## Packages
-
-Packages can be accessed using the following methods:
-
-- `#packages` answers the full list of packages
-- `#packageAt:` answers a specific package or `nil`
-
-## Parsing
-
-The `#parse:` method is used to parse Amber source code.
-It requires the `Compiler` package and the `js/parser.js` parser file in order to work.!
-
-!Smalltalk methodsFor: 'accessing'!
-
-at: aString
-	<return self[aString]>
-!
-
-parse: aString
-	| result |
-	
-	self 
-		try: [result := self basicParse: aString] 
-		catch: [:ex | (self parseError: ex parsing: aString) signal].
-		
-	^ result
-		source: aString;
-		yourself
-!
-
-readJSObject: anObject
-	<return self.readJSObject(anObject)>
-!
-
-reservedWords
-	"JavaScript reserved words"
-	<return self.reservedWords>
-!
-
-version
-	"Answer the version string of Amber"
-	
-	^ '0.11.0'
-! !
-
-!Smalltalk methodsFor: 'classes'!
-
-classes
-	<return self.classes()>
-!
-
-deleteClass: aClass
-	"Deletes a class by deleting its binding only. Use #removeClass instead"
-	
-	<self.removeClass(aClass)>
-!
-
-removeClass: aClass
-	aClass isMetaclass ifTrue: [self error: aClass asString, ' is a Metaclass and cannot be removed!!'].
-	
-	self deleteClass: aClass.
-	
-	SystemAnnouncer current
-		announce: (ClassRemoved new
-			theClass: aClass;
-			yourself)
-! !
-
-!Smalltalk methodsFor: 'error handling'!
-
-asSmalltalkException: anObject
-	"A JavaScript exception may be thrown.
-	We then need to convert it back to a Smalltalk object"
-	
-	^ ((self isSmalltalkObject: anObject) and: [ anObject isKindOf: Error ])
-		ifTrue: [ anObject ]
-		ifFalse: [ JavaScriptException on: anObject ]
-!
-
-parseError: anException parsing: aString
-	^ ParseError new messageText: 'Parse error on line ', (anException basicAt: 'line') ,' column ' , (anException basicAt: 'column') ,' : Unexpected character ', (anException basicAt: 'found')
-! !
-
-!Smalltalk methodsFor: 'globals'!
-
-addGlobalJsVariable: aString
-	self globalJsVariables add: aString
-!
-
-deleteGlobalJsVariable: aString
-	self globalJsVariables remove: aString ifAbsent:[]
-!
-
-globalJsVariables
-	"Array of global JavaScript variables"
-	<return self.globalJsVariables>
-! !
-
-!Smalltalk methodsFor: 'packages'!
-
-createPackage: packageName
-	"Create and bind a new package with given name and return it."
-	<return smalltalk.addPackage(packageName)>
-!
-
-deletePackage: packageName
-	"Deletes a package by deleting its binding, but does not check if it contains classes etc.
-	To remove a package, use #removePackage instead."
-
-	<delete smalltalk.packages[packageName]>
-!
-
-packageAt: packageName
-	<return self.packages[packageName]>
-!
-
-packageAt: packageName ifAbsent: aBlock
-	^(self packageAt: packageName) ifNil: aBlock
-!
-
-packages
-	"Return all Package instances in the system."
-
-	<return self.packages.all()>
-!
-
-pseudoVariableNames
-	^ #('self' 'super' 'nil' 'true' 'false' 'thisContext')
-!
-
-removePackage: packageName
-	"Removes a package and all its classes."
-
-	| pkg |
-	pkg := self packageAt: packageName ifAbsent: [self error: 'Missing package: ', packageName].
-	pkg classes do: [:each |
-			self removeClass: each].
-	self deletePackage: packageName
-!
-
-renamePackage: packageName to: newName
-	"Rename a package."
-
-	| pkg |
-	pkg := self packageAt: packageName ifAbsent: [self error: 'Missing package: ', packageName].
-	(self packageAt: newName) ifNotNil: [self error: 'Already exists a package called: ', newName].
-	(self basicAt: 'packages') at: newName put: pkg.
-	pkg name: newName.
-	self deletePackage: packageName.
-! !
-
-!Smalltalk methodsFor: 'private'!
-
-basicParse: aString
-	<return smalltalk.parser.parse(aString)>
-!
-
-createPackage: packageName properties: aDict
-	"Needed to import .st files: they begin with this call."
-	self deprecatedAPI.
-	
-	aDict isEmpty ifFalse: [ self error: 'createPackage:properties: called with nonempty properties' ].
-	^ self createPackage: packageName
-! !
-
-!Smalltalk methodsFor: 'testing'!
-
-isSmalltalkObject: anObject
-	"Consider anObject a Smalltalk object if it has a 'klass' property.
-	Note that this may be unaccurate"
-	
-	<return typeof anObject.klass !!== 'undefined'>
-! !
-
-Smalltalk class instanceVariableNames: 'current'!
-
-!Smalltalk class methodsFor: 'accessing'!
-
-current
-	<return smalltalk>
-! !
-
-Object subclass: #Timeout
-	instanceVariableNames: 'rawTimeout'
-	package: 'Kernel-Objects'!
-!Timeout commentStamp!
-I am wrapping the returns from `set{Timeout,Interval}`.
-
-## Motivation
-
-Number suffices in browsers, but node.js returns an object.!
-
-!Timeout methodsFor: 'accessing'!
-
-rawTimeout: anObject
-	rawTimeout := anObject
-! !
-
-!Timeout methodsFor: 'timeout/interval'!
-
-clearInterval
-	<
-		var interval = self["@rawTimeout"];
-		clearInterval(interval);
-	>
-!
-
-clearTimeout
-	<
-		var timeout = self["@rawTimeout"];
-		clearTimeout(timeout);
-	>
-! !
-
-!Timeout class methodsFor: 'instance creation'!
-
-on: anObject
-	^self new rawTimeout: anObject; yourself
-! !
-
 Object subclass: #UndefinedObject
 	instanceVariableNames: ''
 	package: 'Kernel-Objects'!
@@ -2101,10 +1233,3 @@ new
 		self error: 'You cannot create new instances of UndefinedObject. Use nil'
 ! !
 
-!String methodsFor: '*Kernel-Objects'!
-
-asJavaScriptSelector
-	"Return first keyword of the selector, without trailing colon."
-	^self replace: '^([a-zA-Z0-9]*).*$' with: '$1'
-! !
-

Vissa filer visades inte eftersom för många filer har ändrats