Browse Source

Merge branch 'master' into debugger

Conflicts:
	js/Importer-Exporter.deploy.js
	js/Importer-Exporter.js
Nicolas Petton 10 years ago
parent
commit
c7aa516c5b
89 changed files with 681 additions and 200 deletions
  1. 1 1
      bin/amberc.js
  2. 1 1
      grunt/tasks/grunt-peg.js
  3. 1 1
      index.html
  4. 2 0
      js/Benchfib.deploy.js
  5. 2 0
      js/Benchfib.js
  6. 2 0
      js/Canvas.deploy.js
  7. 2 0
      js/Canvas.js
  8. 2 0
      js/Compiler-AST.deploy.js
  9. 2 0
      js/Compiler-AST.js
  10. 2 0
      js/Compiler-Core.deploy.js
  11. 2 0
      js/Compiler-Core.js
  12. 2 0
      js/Compiler-Exceptions.deploy.js
  13. 2 0
      js/Compiler-Exceptions.js
  14. 2 0
      js/Compiler-IR.deploy.js
  15. 2 0
      js/Compiler-IR.js
  16. 2 0
      js/Compiler-Inlining.deploy.js
  17. 2 0
      js/Compiler-Inlining.js
  18. 2 0
      js/Compiler-Interpreter.deploy.js
  19. 2 0
      js/Compiler-Interpreter.js
  20. 2 0
      js/Compiler-Semantic.deploy.js
  21. 2 0
      js/Compiler-Semantic.js
  22. 2 0
      js/Compiler-Tests.deploy.js
  23. 2 0
      js/Compiler-Tests.js
  24. 2 0
      js/Examples.deploy.js
  25. 2 0
      js/Examples.js
  26. 2 0
      js/Helios-Announcements.deploy.js
  27. 2 0
      js/Helios-Announcements.js
  28. 2 0
      js/Helios-Browser.deploy.js
  29. 2 0
      js/Helios-Browser.js
  30. 2 0
      js/Helios-Commands-Browser.deploy.js
  31. 2 0
      js/Helios-Commands-Browser.js
  32. 2 0
      js/Helios-Commands-Core.deploy.js
  33. 2 0
      js/Helios-Commands-Core.js
  34. 2 0
      js/Helios-Commands-Tools.deploy.js
  35. 2 0
      js/Helios-Commands-Tools.js
  36. 154 76
      js/Helios-Commands.deploy.js
  37. 154 76
      js/Helios-Commands.js
  38. 2 0
      js/Helios-Core.deploy.js
  39. 2 0
      js/Helios-Core.js
  40. 2 0
      js/Helios-Debugger.deploy.js
  41. 2 0
      js/Helios-Debugger.js
  42. 2 0
      js/Helios-Exceptions.deploy.js
  43. 2 0
      js/Helios-Exceptions.js
  44. 2 0
      js/Helios-Inspector.deploy.js
  45. 2 0
      js/Helios-Inspector.js
  46. 2 0
      js/Helios-KeyBindings.deploy.js
  47. 2 0
      js/Helios-KeyBindings.js
  48. 2 0
      js/Helios-Layout.deploy.js
  49. 2 0
      js/Helios-Layout.js
  50. 2 0
      js/Helios-References.deploy.js
  51. 2 0
      js/Helios-References.js
  52. 2 0
      js/Helios-Transcript.deploy.js
  53. 2 0
      js/Helios-Transcript.js
  54. 2 0
      js/Helios-Workspace-Tests.deploy.js
  55. 2 0
      js/Helios-Workspace-Tests.js
  56. 2 0
      js/Helios-Workspace.deploy.js
  57. 2 0
      js/Helios-Workspace.js
  58. 2 0
      js/IDE.deploy.js
  59. 2 0
      js/IDE.js
  60. 60 3
      js/Importer-Exporter.deploy.js
  61. 82 5
      js/Importer-Exporter.js
  62. 2 0
      js/Kernel-Announcements.deploy.js
  63. 2 0
      js/Kernel-Announcements.js
  64. 2 0
      js/Kernel-Classes.deploy.js
  65. 2 0
      js/Kernel-Classes.js
  66. 2 0
      js/Kernel-Collections.deploy.js
  67. 2 0
      js/Kernel-Collections.js
  68. 2 0
      js/Kernel-Exceptions.deploy.js
  69. 2 0
      js/Kernel-Exceptions.js
  70. 2 0
      js/Kernel-Methods.deploy.js
  71. 2 0
      js/Kernel-Methods.js
  72. 2 0
      js/Kernel-Objects.deploy.js
  73. 2 0
      js/Kernel-Objects.js
  74. 2 0
      js/Kernel-Tests.deploy.js
  75. 2 0
      js/Kernel-Tests.js
  76. 2 0
      js/Kernel-Transcript.deploy.js
  77. 2 0
      js/Kernel-Transcript.js
  78. 2 0
      js/SUnit-Tests.deploy.js
  79. 2 0
      js/SUnit-Tests.js
  80. 2 0
      js/SUnit.deploy.js
  81. 2 0
      js/SUnit.js
  82. 2 0
      js/Spaces.deploy.js
  83. 2 0
      js/Spaces.js
  84. 2 2
      js/amber.js
  85. 39 27
      js/boot.js
  86. 3 3
      js/init.js
  87. 2 0
      js/parser.js
  88. 28 5
      st/Importer-Exporter.st
  89. 2 0
      test/Test.js

+ 1 - 1
bin/amberc.js

@@ -418,7 +418,7 @@ AmberC.prototype.create_compiler = function(compilerFilesArray) {
 			// data is an array where index 0 is the error code and index 1 contains the data
 			content += data[1];
 		});
-		content = content + 'return smalltalk;})();';
+		content = content + 'return global_smalltalk;})();';
 		self.defaults.smalltalk = eval(content);
 		console.log('Compiler loaded');
 		self.defaults.smalltalk.ErrorHandler._setCurrent_(self.defaults.smalltalk.RethrowErrorHandler._new());

+ 1 - 1
grunt/tasks/grunt-peg.js

@@ -23,7 +23,7 @@ module.exports = function(grunt) {
       export_var: 'module.exports'
     });
     var parser = PEG.buildParser(grunt.file.read(this.data.src), options);
-    var content = options.export_var + ' = ' + parser.toSource() + ';\n';
+    var content = '(function(smalltalk,nil){\n'+options.export_var + ' = ' + parser.toSource() + ';\n})(global_smalltalk,global_nil);';
     grunt.file.write(this.data.dest, content);
   });
 };

+ 1 - 1
index.html

@@ -9,6 +9,6 @@
   </head> 
 
   <body> 
-    <script type='text/javascript'> loadAmber({ready: function() {smalltalk.Browser._open()}}) </script> 
+    <script type='text/javascript'> loadAmber({ready: function(smalltalk) {smalltalk.Browser._open()}}) </script>
   </body> 
 </html> 

+ 2 - 0
js/Benchfib.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Benchfib');
 smalltalk.addClass('Benchfib', smalltalk.Object, [], 'Benchfib');
 
@@ -215,3 +216,4 @@ return $1;
 messageSends: ["whileTrue:", "millisecondsToRun:", "benchmark", "<", "*", "benchFib", "+", ",", "printString", "/"]}),
 smalltalk.Number);
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Benchfib.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Benchfib');
 smalltalk.addClass('Benchfib', smalltalk.Object, [], 'Benchfib');
 
@@ -250,3 +251,4 @@ referencedClasses: ["Date"]
 }),
 smalltalk.Number);
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Canvas.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Canvas');
 smalltalk.addClass('HTMLCanvas', smalltalk.Object, ['root'], 'Canvas');
 smalltalk.addMethod(
@@ -2758,3 +2759,4 @@ return self}, function($ctx1) {$ctx1.fill(self,"asJQuery",{},smalltalk.JSObjectP
 messageSends: []}),
 smalltalk.JSObjectProxy);
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Canvas.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Canvas');
 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!' ]";
@@ -3843,3 +3844,4 @@ referencedClasses: []
 }),
 smalltalk.JSObjectProxy);
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Compiler-AST.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Compiler-AST');
 smalltalk.addClass('Node', smalltalk.Object, ['parent', 'position', 'nodes', 'shouldBeInlined', 'shouldBeAliased'], 'Compiler-AST');
 smalltalk.addMethod(
@@ -1648,3 +1649,4 @@ return $1;
 messageSends: ["ifEmpty:", "source", "error:", "parse:", "current"]}),
 smalltalk.CompiledMethod);
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Compiler-AST.js

@@ -1,3 +1,4 @@
+(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.";
@@ -2253,3 +2254,4 @@ referencedClasses: ["Smalltalk"]
 }),
 smalltalk.CompiledMethod);
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Compiler-Core.deploy.js

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

+ 2 - 0
js/Compiler-Core.js

@@ -1,3 +1,4 @@
+(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.";
@@ -1020,3 +1021,4 @@ smalltalk.NodeVisitor);
 
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Compiler-Exceptions.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Compiler-Exceptions');
 smalltalk.addClass('CompilerError', smalltalk.Error, [], 'Compiler-Exceptions');
 
@@ -157,3 +158,4 @@ smalltalk.RethrowErrorHandler);
 
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Compiler-Exceptions.js

@@ -1,3 +1,4 @@
+(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,3 +221,4 @@ smalltalk.RethrowErrorHandler);
 
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Compiler-IR.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Compiler-IR');
 smalltalk.addClass('IRASTTranslator', smalltalk.NodeVisitor, ['source', 'theClass', 'method', 'sequence', 'nextAlias'], 'Compiler-IR');
 smalltalk.addMethod(
@@ -2777,3 +2778,4 @@ return $1;
 messageSends: ["ifTrue:ifFalse:", "includes:", "reservedWords", "current", ","]}),
 smalltalk.String);
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Compiler-IR.js

@@ -1,3 +1,4 @@
+(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.";
@@ -3681,3 +3682,4 @@ referencedClasses: ["Smalltalk"]
 }),
 smalltalk.String);
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Compiler-Inlining.deploy.js

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

+ 2 - 0
js/Compiler-Inlining.js

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

+ 2 - 0
js/Compiler-Interpreter.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Compiler-Interpreter');
 smalltalk.addClass('AIBlockClosure', smalltalk.BlockClosure, ['node', 'outerContext'], 'Compiler-Interpreter');
 smalltalk.addMethod(
@@ -2621,3 +2622,4 @@ return $1;
 messageSends: ["interpretClassReferenceNode:continue:"]}),
 smalltalk.ClassReferenceNode);
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Compiler-Interpreter.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Compiler-Interpreter');
 smalltalk.addClass('AIBlockClosure', smalltalk.BlockClosure, ['node', 'outerContext'], 'Compiler-Interpreter');
 smalltalk.AIBlockClosure.comment="I am a special `BlockClosure` subclass used by an interpreter to interpret a block node.\x0a\x0aWhile I am polymorphic with `BlockClosure`, some methods such as `#new` will raise interpretation errors. Unlike a `BlockClosure`, my instance are not JavaScript functions.\x0a\x0aEvaluating an instance will result in interpreting the `node` instance variable (instance of `BlockNode`).";
@@ -3478,3 +3479,4 @@ referencedClasses: []
 }),
 smalltalk.ClassReferenceNode);
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Compiler-Semantic.deploy.js

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

+ 2 - 0
js/Compiler-Semantic.js

@@ -1,3 +1,4 @@
+(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.";
@@ -1839,3 +1840,4 @@ referencedClasses: []
 smalltalk.SemanticAnalyzer.klass);
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Compiler-Tests.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Compiler-Tests');
 smalltalk.addClass('ASTVisitorTest', smalltalk.TestCase, [], 'Compiler-Tests');
 smalltalk.addMethod(
@@ -1509,3 +1510,4 @@ smalltalk.SemanticAnalyzerTest);
 
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Compiler-Tests.js

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

+ 2 - 0
js/Examples.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Examples');
 smalltalk.addClass('Counter', smalltalk.Widget, ['count', 'header'], 'Examples');
 smalltalk.addMethod(
@@ -82,3 +83,4 @@ messageSends: ["appendToJQuery:", "new", "asJQuery"]}),
 smalltalk.Counter.klass);
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Examples.js

@@ -1,3 +1,4 @@
+(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";
@@ -108,3 +109,4 @@ referencedClasses: []
 smalltalk.Counter.klass);
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Helios-Announcements.deploy.js

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

+ 2 - 0
js/Helios-Announcements.js

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

+ 2 - 0
js/Helios-Browser.deploy.js

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

+ 2 - 0
js/Helios-Browser.js

@@ -1,3 +1,4 @@
+(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.";
@@ -3893,3 +3894,4 @@ referencedClasses: []
 smalltalk.HLSelectorsCache.klass);
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Helios-Commands-Browser.deploy.js

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

+ 2 - 0
js/Helios-Commands-Browser.js

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

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

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

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

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Commands-Core');
 smalltalk.addClass('HLCommand', smalltalk.Object, ['input'], 'Helios-Commands-Core');
 smalltalk.addMethod(
@@ -857,3 +858,4 @@ referencedClasses: []
 smalltalk.HLViewCommand.klass);
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Helios-Commands-Tools.deploy.js

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

+ 2 - 0
js/Helios-Commands-Tools.js

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

+ 154 - 76
js/Helios-Commands.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Commands');
 smalltalk.addClass('HLCommand', smalltalk.Object, [], 'Helios-Commands');
 smalltalk.addMethod(
@@ -6,9 +7,11 @@ smalltalk.method({
 selector: "asActionBinding",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+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();
+return smalltalk.withContext(function($ctx2) {
+return _st(self)._execute();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asActionBinding",{},smalltalk.HLCommand)})},
@@ -21,7 +24,8 @@ smalltalk.method({
 selector: "asBinding",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $2,$1;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
 $2=_st(self)._isBindingGroup();
 if(smalltalk.assert($2)){
 $1=_st(self)._asGroupBinding();
@@ -39,7 +43,8 @@ smalltalk.method({
 selector: "asGroupBinding",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+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)})},
@@ -52,7 +57,8 @@ smalltalk.method({
 selector: "documentation",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
 $1=_st(_st(self)._class())._documentation();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"documentation",{}, smalltalk.HLCommand)})},
@@ -65,7 +71,8 @@ smalltalk.method({
 selector: "execute",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return self}, function($ctx1) {$ctx1.fill(self,"execute",{}, smalltalk.HLCommand)})},
+return smalltalk.withContext(function($ctx1) { 
+return self}, function($ctx1) {$ctx1.fill(self,"execute",{}, smalltalk.HLCommand)})},
 messageSends: []}),
 smalltalk.HLCommand);
 
@@ -75,7 +82,8 @@ smalltalk.method({
 selector: "isBindingGroup",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+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)})},
@@ -88,7 +96,8 @@ smalltalk.method({
 selector: "key",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
 $1=_st(_st(self)._class())._key();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.HLCommand)})},
@@ -101,7 +110,8 @@ smalltalk.method({
 selector: "label",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
 $1=_st(_st(self)._class())._label();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLCommand)})},
@@ -114,7 +124,8 @@ smalltalk.method({
 selector: "registerOn:",
 fn: function (aBinding){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+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)})},
@@ -128,9 +139,11 @@ smalltalk.method({
 selector: "concreteSubclasses",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
 $1=_st(_st(self)._subclasses())._select_((function(each){
-return smalltalk.withContext(function($ctx2) {
return _st(each)._isConcrete();
+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)})},
@@ -143,7 +156,8 @@ smalltalk.method({
 selector: "documentation",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "";
+return smalltalk.withContext(function($ctx1) { 
+return "";
 }, function($ctx1) {$ctx1.fill(self,"documentation",{}, smalltalk.HLCommand.klass)})},
 messageSends: []}),
 smalltalk.HLCommand.klass);
@@ -154,7 +168,8 @@ smalltalk.method({
 selector: "isConcrete",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
 $1=_st(_st(self)._key())._notNil();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"isConcrete",{},smalltalk.HLCommand.klass)})},
@@ -167,7 +182,8 @@ smalltalk.method({
 selector: "key",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return nil;
+return smalltalk.withContext(function($ctx1) { 
+return nil;
 }, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.HLCommand.klass)})},
 messageSends: []}),
 smalltalk.HLCommand.klass);
@@ -178,7 +194,8 @@ smalltalk.method({
 selector: "label",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "";
+return smalltalk.withContext(function($ctx1) { 
+return "";
 }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLCommand.klass)})},
 messageSends: []}),
 smalltalk.HLCommand.klass);
@@ -189,10 +206,12 @@ smalltalk.method({
 selector: "registerConcreteClassesOn:",
 fn: function (aBinding){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+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);
+return smalltalk.withContext(function($ctx2) {
+binding=_st(each)._registerOn_(aBinding);
 binding;
 $1=_st(binding)._isBindingGroup();
 if(smalltalk.assert($1)){
@@ -209,7 +228,8 @@ smalltalk.method({
 selector: "registerOn:",
 fn: function (aBinding){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+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)})},
@@ -224,7 +244,8 @@ smalltalk.method({
 selector: "execute",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
_st(_st((smalltalk.HLManager || HLManager))._current())._removeActiveTab();
+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);
@@ -236,7 +257,8 @@ smalltalk.method({
 selector: "key",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (87);
+return smalltalk.withContext(function($ctx1) { 
+return (87);
 }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLCloseTabCommand.klass)})},
 messageSends: []}),
 smalltalk.HLCloseTabCommand.klass);
@@ -247,7 +269,8 @@ smalltalk.method({
 selector: "label",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Close tab";
+return smalltalk.withContext(function($ctx1) { 
+return "Close tab";
 }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLCloseTabCommand.klass)})},
 messageSends: []}),
 smalltalk.HLCloseTabCommand.klass);
@@ -260,7 +283,8 @@ smalltalk.method({
 selector: "model",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
 $1=self["@model"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLModelCommand)})},
@@ -273,7 +297,8 @@ smalltalk.method({
 selector: "model:",
 fn: function (aModel){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
self["@model"]=aModel;
+return smalltalk.withContext(function($ctx1) { 
+self["@model"]=aModel;
 return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLModelCommand)})},
 messageSends: []}),
 smalltalk.HLModelCommand);
@@ -285,7 +310,8 @@ smalltalk.method({
 selector: "for:",
 fn: function (aModel){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
 $1=_st(self)._new();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"for:",{aModel:aModel},smalltalk.HLModelCommand.klass)})},
@@ -298,10 +324,12 @@ smalltalk.method({
 selector: "registerConcreteClassesOn:for:",
 fn: function (aBinding,aModel){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+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);
+return smalltalk.withContext(function($ctx2) {
+binding=_st(each)._registerOn_for_(aBinding,aModel);
 binding;
 $1=_st(binding)._isBindingGroup();
 if(smalltalk.assert($1)){
@@ -318,7 +346,8 @@ smalltalk.method({
 selector: "registerOn:for:",
 fn: function (aBinding,aModel){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+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)})},
@@ -334,7 +363,8 @@ smalltalk.method({
 selector: "for:",
 fn: function (aBrowserModel){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $2,$3,$1;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$3,$1;
 $2=_st(self)._new();
 _st($2)._model_(aBrowserModel);
 $3=_st($2)._yourself();
@@ -353,7 +383,8 @@ smalltalk.method({
 selector: "key",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (71);
+return smalltalk.withContext(function($ctx1) { 
+return (71);
 }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGoToCommand.klass)})},
 messageSends: []}),
 smalltalk.HLGoToCommand.klass);
@@ -364,7 +395,8 @@ smalltalk.method({
 selector: "label",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Go to";
+return smalltalk.withContext(function($ctx1) { 
+return "Go to";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToCommand.klass)})},
 messageSends: []}),
 smalltalk.HLGoToCommand.klass);
@@ -377,7 +409,8 @@ smalltalk.method({
 selector: "execute",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
_st(_st(self)._model())._focusOnClasses();
+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);
@@ -389,7 +422,8 @@ smalltalk.method({
 selector: "key",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (67);
+return smalltalk.withContext(function($ctx1) { 
+return (67);
 }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGoToClassesCommand.klass)})},
 messageSends: []}),
 smalltalk.HLGoToClassesCommand.klass);
@@ -400,7 +434,8 @@ smalltalk.method({
 selector: "label",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Classes";
+return smalltalk.withContext(function($ctx1) { 
+return "Classes";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToClassesCommand.klass)})},
 messageSends: []}),
 smalltalk.HLGoToClassesCommand.klass);
@@ -413,7 +448,8 @@ smalltalk.method({
 selector: "execute",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
_st(_st(self)._model())._focusOnMethods();
+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);
@@ -425,7 +461,8 @@ smalltalk.method({
 selector: "key",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (77);
+return smalltalk.withContext(function($ctx1) { 
+return (77);
 }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGoToMethodsCommand.klass)})},
 messageSends: []}),
 smalltalk.HLGoToMethodsCommand.klass);
@@ -436,7 +473,8 @@ smalltalk.method({
 selector: "label",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Methods";
+return smalltalk.withContext(function($ctx1) { 
+return "Methods";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToMethodsCommand.klass)})},
 messageSends: []}),
 smalltalk.HLGoToMethodsCommand.klass);
@@ -449,7 +487,8 @@ smalltalk.method({
 selector: "execute",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
_st(_st(self)._model())._focusOnPackages();
+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);
@@ -461,7 +500,8 @@ smalltalk.method({
 selector: "key",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (80);
+return smalltalk.withContext(function($ctx1) { 
+return (80);
 }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGoToPackagesCommand.klass)})},
 messageSends: []}),
 smalltalk.HLGoToPackagesCommand.klass);
@@ -472,7 +512,8 @@ smalltalk.method({
 selector: "label",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Packages";
+return smalltalk.withContext(function($ctx1) { 
+return "Packages";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToPackagesCommand.klass)})},
 messageSends: []}),
 smalltalk.HLGoToPackagesCommand.klass);
@@ -485,7 +526,8 @@ smalltalk.method({
 selector: "execute",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
_st(_st(self)._model())._focusOnProtocols();
+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);
@@ -497,7 +539,8 @@ smalltalk.method({
 selector: "key",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (84);
+return smalltalk.withContext(function($ctx1) { 
+return (84);
 }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGoToProtocolsCommand.klass)})},
 messageSends: []}),
 smalltalk.HLGoToProtocolsCommand.klass);
@@ -508,7 +551,8 @@ smalltalk.method({
 selector: "label",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Protocols";
+return smalltalk.withContext(function($ctx1) { 
+return "Protocols";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToProtocolsCommand.klass)})},
 messageSends: []}),
 smalltalk.HLGoToProtocolsCommand.klass);
@@ -521,7 +565,8 @@ smalltalk.method({
 selector: "execute",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
_st(_st(self)._model())._focusOnSourceCode();
+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);
@@ -533,7 +578,8 @@ smalltalk.method({
 selector: "key",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (83);
+return smalltalk.withContext(function($ctx1) { 
+return (83);
 }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGoToSourceCodeCommand.klass)})},
 messageSends: []}),
 smalltalk.HLGoToSourceCodeCommand.klass);
@@ -544,7 +590,8 @@ smalltalk.method({
 selector: "label",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Source code";
+return smalltalk.withContext(function($ctx1) { 
+return "Source code";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToSourceCodeCommand.klass)})},
 messageSends: []}),
 smalltalk.HLGoToSourceCodeCommand.klass);
@@ -558,7 +605,8 @@ smalltalk.method({
 selector: "key",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (77);
+return smalltalk.withContext(function($ctx1) { 
+return (77);
 }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLMoveToCommand.klass)})},
 messageSends: []}),
 smalltalk.HLMoveToCommand.klass);
@@ -569,7 +617,8 @@ smalltalk.method({
 selector: "label",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Move";
+return smalltalk.withContext(function($ctx1) { 
+return "Move";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMoveToCommand.klass)})},
 messageSends: []}),
 smalltalk.HLMoveToCommand.klass);
@@ -583,7 +632,8 @@ smalltalk.method({
 selector: "key",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (77);
+return smalltalk.withContext(function($ctx1) { 
+return (77);
 }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLMoveMethodToCommand.klass)})},
 messageSends: []}),
 smalltalk.HLMoveMethodToCommand.klass);
@@ -594,7 +644,8 @@ smalltalk.method({
 selector: "label",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Method";
+return smalltalk.withContext(function($ctx1) { 
+return "Method";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMoveMethodToCommand.klass)})},
 messageSends: []}),
 smalltalk.HLMoveMethodToCommand.klass);
@@ -607,7 +658,8 @@ smalltalk.method({
 selector: "execute",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLMoveMethodToClassCommand)})},
+return smalltalk.withContext(function($ctx1) { 
+return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLMoveMethodToClassCommand)})},
 messageSends: []}),
 smalltalk.HLMoveMethodToClassCommand);
 
@@ -618,7 +670,8 @@ smalltalk.method({
 selector: "key",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (67);
+return smalltalk.withContext(function($ctx1) { 
+return (67);
 }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLMoveMethodToClassCommand.klass)})},
 messageSends: []}),
 smalltalk.HLMoveMethodToClassCommand.klass);
@@ -629,7 +682,8 @@ smalltalk.method({
 selector: "label",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "to class";
+return smalltalk.withContext(function($ctx1) { 
+return "to class";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMoveMethodToClassCommand.klass)})},
 messageSends: []}),
 smalltalk.HLMoveMethodToClassCommand.klass);
@@ -642,7 +696,8 @@ smalltalk.method({
 selector: "execute",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLMoveMethodToProtocolCommand)})},
+return smalltalk.withContext(function($ctx1) { 
+return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLMoveMethodToProtocolCommand)})},
 messageSends: []}),
 smalltalk.HLMoveMethodToProtocolCommand);
 
@@ -653,7 +708,8 @@ smalltalk.method({
 selector: "key",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (84);
+return smalltalk.withContext(function($ctx1) { 
+return (84);
 }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLMoveMethodToProtocolCommand.klass)})},
 messageSends: []}),
 smalltalk.HLMoveMethodToProtocolCommand.klass);
@@ -664,7 +720,8 @@ smalltalk.method({
 selector: "label",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "to protocol";
+return smalltalk.withContext(function($ctx1) { 
+return "to protocol";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMoveMethodToProtocolCommand.klass)})},
 messageSends: []}),
 smalltalk.HLMoveMethodToProtocolCommand.klass);
@@ -678,7 +735,8 @@ smalltalk.method({
 selector: "key",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (84);
+return smalltalk.withContext(function($ctx1) { 
+return (84);
 }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLToggleCommand.klass)})},
 messageSends: []}),
 smalltalk.HLToggleCommand.klass);
@@ -689,7 +747,8 @@ smalltalk.method({
 selector: "label",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Toggle";
+return smalltalk.withContext(function($ctx1) { 
+return "Toggle";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLToggleCommand.klass)})},
 messageSends: []}),
 smalltalk.HLToggleCommand.klass);
@@ -702,7 +761,8 @@ smalltalk.method({
 selector: "execute",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
_st(_st(self)._model())._showInstance_(false);
+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);
@@ -714,7 +774,8 @@ smalltalk.method({
 selector: "key",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (67);
+return smalltalk.withContext(function($ctx1) { 
+return (67);
 }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLToggleClassSideCommand.klass)})},
 messageSends: []}),
 smalltalk.HLToggleClassSideCommand.klass);
@@ -725,7 +786,8 @@ smalltalk.method({
 selector: "label",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Class side";
+return smalltalk.withContext(function($ctx1) { 
+return "Class side";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLToggleClassSideCommand.klass)})},
 messageSends: []}),
 smalltalk.HLToggleClassSideCommand.klass);
@@ -738,7 +800,8 @@ smalltalk.method({
 selector: "execute",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
_st(_st(self)._model())._showInstance_(true);
+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);
@@ -750,7 +813,8 @@ smalltalk.method({
 selector: "key",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (73);
+return smalltalk.withContext(function($ctx1) { 
+return (73);
 }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLToggleInstanceSideCommand.klass)})},
 messageSends: []}),
 smalltalk.HLToggleInstanceSideCommand.klass);
@@ -761,7 +825,8 @@ smalltalk.method({
 selector: "label",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Instance side";
+return smalltalk.withContext(function($ctx1) { 
+return "Instance side";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLToggleInstanceSideCommand.klass)})},
 messageSends: []}),
 smalltalk.HLToggleInstanceSideCommand.klass);
@@ -775,7 +840,8 @@ smalltalk.method({
 selector: "key",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (79);
+return smalltalk.withContext(function($ctx1) { 
+return (79);
 }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLOpenCommand.klass)})},
 messageSends: []}),
 smalltalk.HLOpenCommand.klass);
@@ -786,7 +852,8 @@ smalltalk.method({
 selector: "label",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Open";
+return smalltalk.withContext(function($ctx1) { 
+return "Open";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLOpenCommand.klass)})},
 messageSends: []}),
 smalltalk.HLOpenCommand.klass);
@@ -799,7 +866,8 @@ smalltalk.method({
 selector: "execute",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
 $1=_st((smalltalk.HLBrowser || HLBrowser))._openAsTab();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"execute",{}, smalltalk.HLOpenBrowserCommand)})},
@@ -813,7 +881,8 @@ smalltalk.method({
 selector: "key",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (66);
+return smalltalk.withContext(function($ctx1) { 
+return (66);
 }, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.HLOpenBrowserCommand.klass)})},
 messageSends: []}),
 smalltalk.HLOpenBrowserCommand.klass);
@@ -824,7 +893,8 @@ smalltalk.method({
 selector: "label",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Browser";
+return smalltalk.withContext(function($ctx1) { 
+return "Browser";
 }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLOpenBrowserCommand.klass)})},
 messageSends: []}),
 smalltalk.HLOpenBrowserCommand.klass);
@@ -837,7 +907,8 @@ smalltalk.method({
 selector: "execute",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
 $1=_st((smalltalk.HLTranscript || HLTranscript))._openAsTab();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"execute",{}, smalltalk.HLOpenTranscriptCommand)})},
@@ -851,7 +922,8 @@ smalltalk.method({
 selector: "key",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (84);
+return smalltalk.withContext(function($ctx1) { 
+return (84);
 }, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.HLOpenTranscriptCommand.klass)})},
 messageSends: []}),
 smalltalk.HLOpenTranscriptCommand.klass);
@@ -862,7 +934,8 @@ smalltalk.method({
 selector: "label",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Transcript";
+return smalltalk.withContext(function($ctx1) { 
+return "Transcript";
 }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLOpenTranscriptCommand.klass)})},
 messageSends: []}),
 smalltalk.HLOpenTranscriptCommand.klass);
@@ -875,7 +948,8 @@ smalltalk.method({
 selector: "execute",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
 $1=_st((smalltalk.HLCodeWidget || HLCodeWidget))._openAsTab();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLOpenWorkspaceCommand)})},
@@ -889,7 +963,8 @@ smalltalk.method({
 selector: "key",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (87);
+return smalltalk.withContext(function($ctx1) { 
+return (87);
 }, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.HLOpenWorkspaceCommand.klass)})},
 messageSends: []}),
 smalltalk.HLOpenWorkspaceCommand.klass);
@@ -900,7 +975,8 @@ smalltalk.method({
 selector: "label",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Workspace";
+return smalltalk.withContext(function($ctx1) { 
+return "Workspace";
 }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLOpenWorkspaceCommand.klass)})},
 messageSends: []}),
 smalltalk.HLOpenWorkspaceCommand.klass);
@@ -914,9 +990,11 @@ smalltalk.method({
 selector: "label",
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "View";
+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);

+ 154 - 76
js/Helios-Commands.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Commands');
 smalltalk.addClass('HLCommand', smalltalk.Object, [], 'Helios-Commands');
 smalltalk.addMethod(
@@ -7,9 +8,11 @@ selector: "asActionBinding",
 category: 'converting',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+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();
+return smalltalk.withContext(function($ctx2) {
+return _st(self)._execute();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asActionBinding",{},smalltalk.HLCommand)})},
@@ -27,7 +30,8 @@ selector: "asBinding",
 category: 'converting',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $2,$1;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
 $2=_st(self)._isBindingGroup();
 if(smalltalk.assert($2)){
 $1=_st(self)._asGroupBinding();
@@ -50,7 +54,8 @@ selector: "asGroupBinding",
 category: 'converting',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+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)})},
@@ -68,7 +73,8 @@ selector: "documentation",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
 $1=_st(_st(self)._class())._documentation();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"documentation",{}, smalltalk.HLCommand)})},
@@ -86,7 +92,8 @@ selector: "execute",
 category: 'executing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return self}, function($ctx1) {$ctx1.fill(self,"execute",{}, smalltalk.HLCommand)})},
+return smalltalk.withContext(function($ctx1) { 
+return self}, function($ctx1) {$ctx1.fill(self,"execute",{}, smalltalk.HLCommand)})},
 args: [],
 source: "execute\x0a\x09",
 messageSends: [],
@@ -101,7 +108,8 @@ selector: "isBindingGroup",
 category: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+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)})},
@@ -119,7 +127,8 @@ selector: "key",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
 $1=_st(_st(self)._class())._key();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.HLCommand)})},
@@ -137,7 +146,8 @@ selector: "label",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
 $1=_st(_st(self)._class())._label();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLCommand)})},
@@ -155,7 +165,8 @@ selector: "registerOn:",
 category: 'registration',
 fn: function (aBinding){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+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)})},
@@ -174,9 +185,11 @@ selector: "concreteSubclasses",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
 $1=_st(_st(self)._subclasses())._select_((function(each){
-return smalltalk.withContext(function($ctx2) {
return _st(each)._isConcrete();
+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)})},
@@ -194,7 +207,8 @@ selector: "documentation",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "";
+return smalltalk.withContext(function($ctx1) { 
+return "";
 }, function($ctx1) {$ctx1.fill(self,"documentation",{}, smalltalk.HLCommand.klass)})},
 args: [],
 source: "documentation\x0a\x09^ ''",
@@ -210,7 +224,8 @@ selector: "isConcrete",
 category: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
 $1=_st(_st(self)._key())._notNil();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"isConcrete",{},smalltalk.HLCommand.klass)})},
@@ -228,7 +243,8 @@ selector: "key",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return nil;
+return smalltalk.withContext(function($ctx1) { 
+return nil;
 }, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.HLCommand.klass)})},
 args: [],
 source: "key\x0a\x09^ nil",
@@ -244,7 +260,8 @@ selector: "label",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "";
+return smalltalk.withContext(function($ctx1) { 
+return "";
 }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLCommand.klass)})},
 args: [],
 source: "label\x0a\x09^ ''",
@@ -260,10 +277,12 @@ selector: "registerConcreteClassesOn:",
 category: 'registration',
 fn: function (aBinding){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+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);
+return smalltalk.withContext(function($ctx2) {
+binding=_st(each)._registerOn_(aBinding);
 binding;
 $1=_st(binding)._isBindingGroup();
 if(smalltalk.assert($1)){
@@ -285,7 +304,8 @@ selector: "registerOn:",
 category: 'registration',
 fn: function (aBinding){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+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)})},
@@ -305,7 +325,8 @@ selector: "execute",
 category: 'executing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
_st(_st((smalltalk.HLManager || HLManager))._current())._removeActiveTab();
+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",
@@ -322,7 +343,8 @@ selector: "key",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (87);
+return smalltalk.withContext(function($ctx1) { 
+return (87);
 }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLCloseTabCommand.klass)})},
 args: [],
 source: "key\x0a\x09^ 87",
@@ -338,7 +360,8 @@ selector: "label",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Close tab";
+return smalltalk.withContext(function($ctx1) { 
+return "Close tab";
 }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLCloseTabCommand.klass)})},
 args: [],
 source: "label\x0a\x09^ 'Close tab'",
@@ -356,7 +379,8 @@ selector: "model",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
 $1=self["@model"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLModelCommand)})},
@@ -374,7 +398,8 @@ selector: "model:",
 category: 'accessing',
 fn: function (aModel){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
self["@model"]=aModel;
+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",
@@ -391,7 +416,8 @@ selector: "for:",
 category: 'instance creation',
 fn: function (aModel){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
 $1=_st(self)._new();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"for:",{aModel:aModel},smalltalk.HLModelCommand.klass)})},
@@ -409,10 +435,12 @@ selector: "registerConcreteClassesOn:for:",
 category: 'registration',
 fn: function (aBinding,aModel){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+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);
+return smalltalk.withContext(function($ctx2) {
+binding=_st(each)._registerOn_for_(aBinding,aModel);
 binding;
 $1=_st(binding)._isBindingGroup();
 if(smalltalk.assert($1)){
@@ -434,7 +462,8 @@ selector: "registerOn:for:",
 category: 'registration',
 fn: function (aBinding,aModel){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+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)})},
@@ -455,7 +484,8 @@ selector: "for:",
 category: 'instance creation',
 fn: function (aBrowserModel){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $2,$3,$1;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$3,$1;
 $2=_st(self)._new();
 _st($2)._model_(aBrowserModel);
 $3=_st($2)._yourself();
@@ -479,7 +509,8 @@ selector: "key",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (71);
+return smalltalk.withContext(function($ctx1) { 
+return (71);
 }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGoToCommand.klass)})},
 args: [],
 source: "key\x0a\x09^ 71",
@@ -495,7 +526,8 @@ selector: "label",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Go to";
+return smalltalk.withContext(function($ctx1) { 
+return "Go to";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToCommand.klass)})},
 args: [],
 source: "label\x0a\x09^ 'Go to'",
@@ -513,7 +545,8 @@ selector: "execute",
 category: 'executing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
_st(_st(self)._model())._focusOnClasses();
+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",
@@ -530,7 +563,8 @@ selector: "key",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (67);
+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",
@@ -546,7 +580,8 @@ selector: "label",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Classes";
+return smalltalk.withContext(function($ctx1) { 
+return "Classes";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToClassesCommand.klass)})},
 args: [],
 source: "label\x0a\x09^ 'Classes'",
@@ -564,7 +599,8 @@ selector: "execute",
 category: 'executing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
_st(_st(self)._model())._focusOnMethods();
+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",
@@ -581,7 +617,8 @@ selector: "key",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (77);
+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",
@@ -597,7 +634,8 @@ selector: "label",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Methods";
+return smalltalk.withContext(function($ctx1) { 
+return "Methods";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToMethodsCommand.klass)})},
 args: [],
 source: "label\x0a\x09^ 'Methods'",
@@ -615,7 +653,8 @@ selector: "execute",
 category: 'executing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
_st(_st(self)._model())._focusOnPackages();
+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",
@@ -632,7 +671,8 @@ selector: "key",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (80);
+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",
@@ -648,7 +688,8 @@ selector: "label",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Packages";
+return smalltalk.withContext(function($ctx1) { 
+return "Packages";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToPackagesCommand.klass)})},
 args: [],
 source: "label\x0a\x09^ 'Packages'",
@@ -666,7 +707,8 @@ selector: "execute",
 category: 'executing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
_st(_st(self)._model())._focusOnProtocols();
+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",
@@ -683,7 +725,8 @@ selector: "key",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (84);
+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",
@@ -699,7 +742,8 @@ selector: "label",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Protocols";
+return smalltalk.withContext(function($ctx1) { 
+return "Protocols";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToProtocolsCommand.klass)})},
 args: [],
 source: "label\x0a\x09^ 'Protocols'",
@@ -717,7 +761,8 @@ selector: "execute",
 category: 'executing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
_st(_st(self)._model())._focusOnSourceCode();
+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",
@@ -734,7 +779,8 @@ selector: "key",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (83);
+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",
@@ -750,7 +796,8 @@ selector: "label",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Source code";
+return smalltalk.withContext(function($ctx1) { 
+return "Source code";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToSourceCodeCommand.klass)})},
 args: [],
 source: "label\x0a\x09^ 'Source code'",
@@ -769,7 +816,8 @@ selector: "key",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (77);
+return smalltalk.withContext(function($ctx1) { 
+return (77);
 }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLMoveToCommand.klass)})},
 args: [],
 source: "key\x0a\x09^ 77",
@@ -785,7 +833,8 @@ selector: "label",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Move";
+return smalltalk.withContext(function($ctx1) { 
+return "Move";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMoveToCommand.klass)})},
 args: [],
 source: "label\x0a\x09^ 'Move'",
@@ -804,7 +853,8 @@ selector: "key",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (77);
+return smalltalk.withContext(function($ctx1) { 
+return (77);
 }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLMoveMethodToCommand.klass)})},
 args: [],
 source: "key\x0a\x09^ 77",
@@ -820,7 +870,8 @@ selector: "label",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Method";
+return smalltalk.withContext(function($ctx1) { 
+return "Method";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMoveMethodToCommand.klass)})},
 args: [],
 source: "label\x0a\x09^ 'Method'",
@@ -838,7 +889,8 @@ selector: "execute",
 category: 'executing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLMoveMethodToClassCommand)})},
+return smalltalk.withContext(function($ctx1) { 
+return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLMoveMethodToClassCommand)})},
 args: [],
 source: "execute",
 messageSends: [],
@@ -854,7 +906,8 @@ selector: "key",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (67);
+return smalltalk.withContext(function($ctx1) { 
+return (67);
 }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLMoveMethodToClassCommand.klass)})},
 args: [],
 source: "key\x0a\x09^ 67",
@@ -870,7 +923,8 @@ selector: "label",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "to class";
+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'",
@@ -888,7 +942,8 @@ selector: "execute",
 category: 'executing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLMoveMethodToProtocolCommand)})},
+return smalltalk.withContext(function($ctx1) { 
+return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLMoveMethodToProtocolCommand)})},
 args: [],
 source: "execute",
 messageSends: [],
@@ -904,7 +959,8 @@ selector: "key",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (84);
+return smalltalk.withContext(function($ctx1) { 
+return (84);
 }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLMoveMethodToProtocolCommand.klass)})},
 args: [],
 source: "key\x0a\x09^ 84",
@@ -920,7 +976,8 @@ selector: "label",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "to protocol";
+return smalltalk.withContext(function($ctx1) { 
+return "to protocol";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMoveMethodToProtocolCommand.klass)})},
 args: [],
 source: "label\x0a\x09^ 'to protocol'",
@@ -939,7 +996,8 @@ selector: "key",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (84);
+return smalltalk.withContext(function($ctx1) { 
+return (84);
 }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLToggleCommand.klass)})},
 args: [],
 source: "key\x0a\x09^ 84",
@@ -955,7 +1013,8 @@ selector: "label",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Toggle";
+return smalltalk.withContext(function($ctx1) { 
+return "Toggle";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLToggleCommand.klass)})},
 args: [],
 source: "label\x0a\x09^ 'Toggle'",
@@ -973,7 +1032,8 @@ selector: "execute",
 category: 'executing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
_st(_st(self)._model())._showInstance_(false);
+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",
@@ -990,7 +1050,8 @@ selector: "key",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (67);
+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",
@@ -1006,7 +1067,8 @@ selector: "label",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Class side";
+return smalltalk.withContext(function($ctx1) { 
+return "Class side";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLToggleClassSideCommand.klass)})},
 args: [],
 source: "label\x0a\x09^ 'Class side'",
@@ -1024,7 +1086,8 @@ selector: "execute",
 category: 'executing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
_st(_st(self)._model())._showInstance_(true);
+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",
@@ -1041,7 +1104,8 @@ selector: "key",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (73);
+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",
@@ -1057,7 +1121,8 @@ selector: "label",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Instance side";
+return smalltalk.withContext(function($ctx1) { 
+return "Instance side";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLToggleInstanceSideCommand.klass)})},
 args: [],
 source: "label\x0a\x09^ 'Instance side'",
@@ -1076,7 +1141,8 @@ selector: "key",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (79);
+return smalltalk.withContext(function($ctx1) { 
+return (79);
 }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLOpenCommand.klass)})},
 args: [],
 source: "key\x0a\x09^ 79",
@@ -1092,7 +1158,8 @@ selector: "label",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Open";
+return smalltalk.withContext(function($ctx1) { 
+return "Open";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLOpenCommand.klass)})},
 args: [],
 source: "label\x0a\x09^ 'Open'",
@@ -1110,7 +1177,8 @@ selector: "execute",
 category: 'executing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
 $1=_st((smalltalk.HLBrowser || HLBrowser))._openAsTab();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"execute",{}, smalltalk.HLOpenBrowserCommand)})},
@@ -1129,7 +1197,8 @@ selector: "key",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (66);
+return smalltalk.withContext(function($ctx1) { 
+return (66);
 }, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.HLOpenBrowserCommand.klass)})},
 args: [],
 source: "key\x0a\x09^ 66",
@@ -1145,7 +1214,8 @@ selector: "label",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Browser";
+return smalltalk.withContext(function($ctx1) { 
+return "Browser";
 }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLOpenBrowserCommand.klass)})},
 args: [],
 source: "label\x0a\x09^ 'Browser'",
@@ -1163,7 +1233,8 @@ selector: "execute",
 category: 'executing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
 $1=_st((smalltalk.HLTranscript || HLTranscript))._openAsTab();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"execute",{}, smalltalk.HLOpenTranscriptCommand)})},
@@ -1182,7 +1253,8 @@ selector: "key",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (84);
+return smalltalk.withContext(function($ctx1) { 
+return (84);
 }, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.HLOpenTranscriptCommand.klass)})},
 args: [],
 source: "key\x0a\x09^ 84",
@@ -1198,7 +1270,8 @@ selector: "label",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Transcript";
+return smalltalk.withContext(function($ctx1) { 
+return "Transcript";
 }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLOpenTranscriptCommand.klass)})},
 args: [],
 source: "label\x0a\x09^ 'Transcript'",
@@ -1216,7 +1289,8 @@ selector: "execute",
 category: 'executing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
var $1;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
 $1=_st((smalltalk.HLCodeWidget || HLCodeWidget))._openAsTab();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLOpenWorkspaceCommand)})},
@@ -1235,7 +1309,8 @@ selector: "key",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return (87);
+return smalltalk.withContext(function($ctx1) { 
+return (87);
 }, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.HLOpenWorkspaceCommand.klass)})},
 args: [],
 source: "key\x0a\x09^ 87",
@@ -1251,7 +1326,8 @@ selector: "label",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "Workspace";
+return smalltalk.withContext(function($ctx1) { 
+return "Workspace";
 }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLOpenWorkspaceCommand.klass)})},
 args: [],
 source: "label\x0a\x09^ 'Workspace'",
@@ -1270,7 +1346,8 @@ selector: "label",
 category: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
return "View";
+return smalltalk.withContext(function($ctx1) { 
+return "View";
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLViewCommand.klass)})},
 args: [],
 source: "label\x0a\x09^ 'View'",
@@ -1280,3 +1357,4 @@ referencedClasses: []
 smalltalk.HLViewCommand.klass);
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Helios-Core.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Core');
 smalltalk.addClass('HLModel', smalltalk.Object, ['announcer', 'environment'], 'Helios-Core');
 smalltalk.addMethod(
@@ -3699,3 +3700,4 @@ messageSends: []}),
 smalltalk.HLSUnit.klass);
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Helios-Core.js

@@ -1,3 +1,4 @@
+(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";
@@ -4870,3 +4871,4 @@ referencedClasses: []
 smalltalk.HLSUnit.klass);
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Helios-Debugger.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Debugger');
 smalltalk.addClass('HLContextInspectorDecorator', smalltalk.Object, ['context'], 'Helios-Debugger');
 smalltalk.addMethod(
@@ -772,3 +773,4 @@ smalltalk.HLStackListWidget);
 
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Helios-Debugger.js

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

+ 2 - 0
js/Helios-Exceptions.deploy.js

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

+ 2 - 0
js/Helios-Exceptions.js

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

+ 2 - 0
js/Helios-Inspector.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Inspector');
 smalltalk.addClass('HLInspectorDisplayWidget', smalltalk.HLNavigationListWidget, ['model'], 'Helios-Inspector');
 smalltalk.addMethod(
@@ -1058,3 +1059,4 @@ messageSends: ["valueWithInterval:", "do:", "inspectors", "refresh"]}),
 smalltalk.HLInspector.klass);
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Helios-Inspector.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Inspector');
 smalltalk.addClass('HLInspectorDisplayWidget', smalltalk.HLNavigationListWidget, ['model'], 'Helios-Inspector');
 smalltalk.addMethod(
@@ -1428,3 +1429,4 @@ referencedClasses: []
 smalltalk.HLInspector.klass);
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Helios-KeyBindings.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-KeyBindings');
 smalltalk.addClass('HLBinding', smalltalk.Object, ['key', 'label'], 'Helios-KeyBindings');
 smalltalk.addMethod(
@@ -1688,3 +1689,4 @@ messageSends: ["widget:", "new", "yourself"]}),
 smalltalk.HLRepeatingKeyBindingHandler.klass);
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Helios-KeyBindings.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-KeyBindings');
 smalltalk.addClass('HLBinding', smalltalk.Object, ['key', 'label'], 'Helios-KeyBindings');
 smalltalk.addMethod(
@@ -2229,3 +2230,4 @@ referencedClasses: []
 smalltalk.HLRepeatingKeyBindingHandler.klass);
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Helios-Layout.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Layout');
 smalltalk.addClass('HLContainer', smalltalk.HLWidget, ['splitter'], 'Helios-Layout');
 smalltalk.addMethod(
@@ -391,3 +392,4 @@ return false;
 messageSends: []}),
 smalltalk.Object);
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Helios-Layout.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Layout');
 smalltalk.addClass('HLContainer', smalltalk.HLWidget, ['splitter'], 'Helios-Layout');
 smalltalk.addMethod(
@@ -531,3 +532,4 @@ referencedClasses: []
 }),
 smalltalk.Object);
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Helios-References.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-References');
 smalltalk.addClass('HLMethodReference', smalltalk.Object, ['selector', 'methodClass'], 'Helios-References');
 smalltalk.addMethod(
@@ -840,3 +841,4 @@ smalltalk.HLReferencesModel);
 
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Helios-References.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-References');
 smalltalk.addClass('HLMethodReference', smalltalk.Object, ['selector', 'methodClass'], 'Helios-References');
 smalltalk.addMethod(
@@ -1110,3 +1111,4 @@ smalltalk.HLReferencesModel);
 
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Helios-Transcript.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Transcript');
 smalltalk.addClass('HLTranscript', smalltalk.HLWidget, ['textarea'], 'Helios-Transcript');
 smalltalk.addMethod(
@@ -171,3 +172,4 @@ messageSends: ["remove:", "transcripts"]}),
 smalltalk.HLTranscriptHandler.klass);
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Helios-Transcript.js

@@ -1,3 +1,4 @@
+(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.";
@@ -233,3 +234,4 @@ referencedClasses: []
 smalltalk.HLTranscriptHandler.klass);
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Helios-Workspace-Tests.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Workspace-Tests');
 smalltalk.addClass('HLCodeWidgetTest', smalltalk.TestCase, [], 'Helios-Workspace-Tests');
 smalltalk.addMethod(
@@ -16,3 +17,4 @@ smalltalk.HLCodeWidgetTest);
 
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Helios-Workspace-Tests.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Workspace-Tests');
 smalltalk.addClass('HLCodeWidgetTest', smalltalk.TestCase, [], 'Helios-Workspace-Tests');
 smalltalk.addMethod(
@@ -21,3 +22,4 @@ smalltalk.HLCodeWidgetTest);
 
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Helios-Workspace.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Workspace');
 smalltalk.addClass('HLCodeModel', smalltalk.Object, ['announcer', 'environment', 'receiver'], 'Helios-Workspace');
 smalltalk.addMethod(
@@ -1575,3 +1576,4 @@ messageSends: []}),
 smalltalk.HLWorkspace.klass);
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Helios-Workspace.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Workspace');
 smalltalk.addClass('HLCodeModel', smalltalk.Object, ['announcer', 'environment', 'receiver'], 'Helios-Workspace');
 smalltalk.addMethod(
@@ -2075,3 +2076,4 @@ referencedClasses: []
 smalltalk.HLWorkspace.klass);
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/IDE.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('IDE');
 smalltalk.addClass('ClassesList', smalltalk.Widget, ['browser', 'ul', 'nodes'], 'IDE');
 smalltalk.addMethod(
@@ -5538,3 +5539,4 @@ return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspe
 messageSends: ["new", "at:put:", "home", "receiver", "selector", "temps", "do:", "instanceVariableNames", "class", "instVarAt:", "setLabel:", "printString", "setVariables:"]}),
 smalltalk.MethodContext);
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/IDE.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('IDE');
 smalltalk.addClass('ClassesList', smalltalk.Widget, ['browser', 'ul', 'nodes'], 'IDE');
 smalltalk.addMethod(
@@ -6963,3 +6964,4 @@ referencedClasses: ["Dictionary"]
 }),
 smalltalk.MethodContext);
 
+})(global_smalltalk,global_nil,global__st);

+ 60 - 3
js/Importer-Exporter.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Importer-Exporter');
 smalltalk.addClass('ChunkParser', smalltalk.Object, ['stream'], 'Importer-Exporter');
 smalltalk.addMethod(
@@ -265,18 +266,25 @@ return smalltalk.withContext(function($ctx1) {
 var $1;
 $1=_st($String())._streamContents_((function(stream){
 return smalltalk.withContext(function($ctx2) {
+self._exportPackagePrologueOn_(stream);
+return _st((function(){
+return smalltalk.withContext(function($ctx3) {
 package_=_st(_st($Smalltalk())._current())._packageAt_(packageName);
 package_;
 self._exportPackageDefinitionOf_on_(package_,stream);
 _st(_st(_st(package_)._sortedClasses())._asSet())._do_((function(each){
-return smalltalk.withContext(function($ctx3) {
+return smalltalk.withContext(function($ctx4) {
 return _st(stream)._nextPutAll_(self._exportClass_(each));
 }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
 return self._exportPackageExtensionsOf_on_(package_,stream);
-}, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1,1)})}));
+}, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}))._ensure_((function(){
+return smalltalk.withContext(function($ctx3) {
+return self._exportPackageEpilogueOn_(stream);
+}, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}));
+}, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"exportPackage:",{packageName:packageName,package_:package_},smalltalk.Exporter)})},
-messageSends: ["streamContents:", "packageAt:", "current", "exportPackageDefinitionOf:on:", "do:", "asSet", "sortedClasses", "nextPutAll:", "exportClass:", "exportPackageExtensionsOf:on:"]}),
+messageSends: ["streamContents:", "exportPackagePrologueOn:", "ensure:", "exportPackageEpilogueOn:", "packageAt:", "current", "exportPackageDefinitionOf:on:", "do:", "nextPutAll:", "exportClass:", "asSet", "sortedClasses", "exportPackageExtensionsOf:on:"]}),
 smalltalk.Exporter);
 
 smalltalk.addMethod(
@@ -294,6 +302,20 @@ return self}, function($ctx1) {$ctx1.fill(self,"exportPackageDefinitionOf:on:",{
 messageSends: ["nextPutAll:", ",", "name", "lf"]}),
 smalltalk.Exporter);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "exportPackageEpilogueOn:",
+fn: function (aStream){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+$1=aStream;
+_st($1)._nextPutAll_("})(global_smalltalk,global_nil,global__st);");
+$2=_st($1)._lf();
+return self}, function($ctx1) {$ctx1.fill(self,"exportPackageEpilogueOn:",{aStream:aStream},smalltalk.Exporter)})},
+messageSends: ["nextPutAll:", "lf"]}),
+smalltalk.Exporter);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "exportPackageExtensionsOf:on:",
@@ -325,6 +347,20 @@ return self}, function($ctx1) {$ctx1.fill(self,"exportPackageExtensionsOf:on:",{
 messageSends: ["name", "do:", "sortedClasses:", "classes", "current", "class", "sorted:", "values", "methodDictionary", "<=", "selector", "ifTrue:", "match:", "category", ",", "exportMethod:of:on:"]}),
 smalltalk.Exporter);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "exportPackagePrologueOn:",
+fn: function (aStream){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+$1=aStream;
+_st($1)._nextPutAll_("(function(smalltalk,nil,_st){");
+$2=_st($1)._lf();
+return self}, function($ctx1) {$ctx1.fill(self,"exportPackagePrologueOn:",{aStream:aStream},smalltalk.Exporter)})},
+messageSends: ["nextPutAll:", "lf"]}),
+smalltalk.Exporter);
+
 
 
 smalltalk.addClass('ChunkExporter', smalltalk.Exporter, [], 'Importer-Exporter');
@@ -521,6 +557,16 @@ return self}, function($ctx1) {$ctx1.fill(self,"exportPackageDefinitionOf:on:",{
 messageSends: ["nextPutAll:", ",", "name", "lf"]}),
 smalltalk.ChunkExporter);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "exportPackageEpilogueOn:",
+fn: function (aStream){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self}, function($ctx1) {$ctx1.fill(self,"exportPackageEpilogueOn:",{aStream:aStream},smalltalk.ChunkExporter)})},
+messageSends: []}),
+smalltalk.ChunkExporter);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "exportPackageExtensionsOf:on:",
@@ -562,6 +608,16 @@ return self}, function($ctx1) {$ctx1.fill(self,"exportPackageExtensionsOf:on:",{
 messageSends: ["name", "do:", "sortedClasses:", "classes", "current", "class", "new", "protocolsDo:", "ifTrue:", "match:", ",", "at:put:", "sorted:", "keys", "<=", "at:", "exportMethods:category:of:on:"]}),
 smalltalk.ChunkExporter);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "exportPackagePrologueOn:",
+fn: function (aStream){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self}, function($ctx1) {$ctx1.fill(self,"exportPackagePrologueOn:",{aStream:aStream},smalltalk.ChunkExporter)})},
+messageSends: []}),
+smalltalk.ChunkExporter);
+
 
 
 smalltalk.addClass('StrippedExporter', smalltalk.Exporter, [], 'Importer-Exporter');
@@ -780,3 +836,4 @@ return $1;
 messageSends: ["commit:", "new"]}),
 smalltalk.Package);
 
+})(global_smalltalk,global_nil,global__st);

+ 82 - 5
js/Importer-Exporter.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Importer-Exporter');
 smalltalk.addClass('ChunkParser', smalltalk.Object, ['stream'], 'Importer-Exporter');
 smalltalk.ChunkParser.comment="I am responsible for parsing aStream contents in the chunk format.\x0a\x0a## API\x0a\x0a    ChunkParser new\x0a        stream: aStream;\x0a        nextChunk";
@@ -318,21 +319,28 @@ return smalltalk.withContext(function($ctx1) {
 var $1;
 $1=_st($String())._streamContents_((function(stream){
 return smalltalk.withContext(function($ctx2) {
+self._exportPackagePrologueOn_(stream);
+return _st((function(){
+return smalltalk.withContext(function($ctx3) {
 package_=_st(_st($Smalltalk())._current())._packageAt_(packageName);
 package_;
 self._exportPackageDefinitionOf_on_(package_,stream);
 _st(_st(_st(package_)._sortedClasses())._asSet())._do_((function(each){
-return smalltalk.withContext(function($ctx3) {
+return smalltalk.withContext(function($ctx4) {
 return _st(stream)._nextPutAll_(self._exportClass_(each));
 }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
 return self._exportPackageExtensionsOf_on_(package_,stream);
-}, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1,1)})}));
+}, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}))._ensure_((function(){
+return smalltalk.withContext(function($ctx3) {
+return self._exportPackageEpilogueOn_(stream);
+}, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}));
+}, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"exportPackage:",{packageName:packageName,package_:package_},smalltalk.Exporter)})},
 args: ["packageName"],
-source: "exportPackage: packageName\x0a\x09\x22Export a given package by name.\x22\x0a\x0a\x09| package |\x0a\x09^String streamContents: [:stream |\x0a\x09\x09\x09\x09package := Smalltalk current packageAt: packageName.\x0a\x09\x09\x09\x09self exportPackageDefinitionOf: package on: stream.\x0a\x0a\x09\x09\x22Export classes in dependency order.\x0a\x09\x09Update (issue #171): Remove duplicates for export\x22\x0a\x09\x09\x09package sortedClasses asSet do: [:each |\x0a\x09\x09\x09\x09\x09\x09stream nextPutAll: (self exportClass: each)].\x0a\x09\x09self exportPackageExtensionsOf: package on: stream]",
-messageSends: ["streamContents:", "packageAt:", "current", "exportPackageDefinitionOf:on:", "do:", "asSet", "sortedClasses", "nextPutAll:", "exportClass:", "exportPackageExtensionsOf:on:"],
-referencedClasses: ["String", "Smalltalk"]
+source: "exportPackage: packageName\x0a\x09\x22Export a given package by name.\x22\x0a\x0a\x09| package |\x0a\x09^String streamContents: [:stream |\x0a\x09\x09self exportPackagePrologueOn: stream.\x0a\x09\x09[\x0a\x09\x09\x09package := Smalltalk current packageAt: packageName.\x0a\x09\x09\x09self exportPackageDefinitionOf: package on: stream.\x0a\x0a\x09\x09\x09\x22Export classes in dependency order.\x0a\x09\x09\x09Update (issue #171): Remove duplicates for export\x22\x0a\x09\x09\x09package sortedClasses asSet do: [:each |\x0a\x09\x09\x09\x09\x09\x09stream nextPutAll: (self exportClass: each)].\x0a\x09\x09\x09self exportPackageExtensionsOf: package on: stream\x0a\x09\x09] ensure: [\x0a\x09\x09\x09self exportPackageEpilogueOn: stream\x0a\x09\x09]]",
+messageSends: ["streamContents:", "exportPackagePrologueOn:", "ensure:", "exportPackageEpilogueOn:", "packageAt:", "current", "exportPackageDefinitionOf:on:", "do:", "nextPutAll:", "exportClass:", "asSet", "sortedClasses", "exportPackageExtensionsOf:on:"],
+referencedClasses: ["Smalltalk", "String"]
 }),
 smalltalk.Exporter);
 
@@ -356,6 +364,25 @@ referencedClasses: []
 }),
 smalltalk.Exporter);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "exportPackageEpilogueOn:",
+category: 'private',
+fn: function (aStream){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+$1=aStream;
+_st($1)._nextPutAll_("})(global_smalltalk,global_nil,global__st);");
+$2=_st($1)._lf();
+return self}, function($ctx1) {$ctx1.fill(self,"exportPackageEpilogueOn:",{aStream:aStream},smalltalk.Exporter)})},
+args: ["aStream"],
+source: "exportPackageEpilogueOn: aStream\x0a\x09aStream\x0a\x09\x09nextPutAll: '})(global_smalltalk,global_nil,global__st);';\x0a\x09\x09lf",
+messageSends: ["nextPutAll:", "lf"],
+referencedClasses: []
+}),
+smalltalk.Exporter);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "exportPackageExtensionsOf:on:",
@@ -392,6 +419,25 @@ referencedClasses: ["Package", "Smalltalk"]
 }),
 smalltalk.Exporter);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "exportPackagePrologueOn:",
+category: 'private',
+fn: function (aStream){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+$1=aStream;
+_st($1)._nextPutAll_("(function(smalltalk,nil,_st){");
+$2=_st($1)._lf();
+return self}, function($ctx1) {$ctx1.fill(self,"exportPackagePrologueOn:",{aStream:aStream},smalltalk.Exporter)})},
+args: ["aStream"],
+source: "exportPackagePrologueOn: aStream\x0a\x09aStream\x0a\x09\x09nextPutAll: '(function(smalltalk,nil,_st){';\x0a\x09\x09lf",
+messageSends: ["nextPutAll:", "lf"],
+referencedClasses: []
+}),
+smalltalk.Exporter);
+
 
 
 smalltalk.addClass('ChunkExporter', smalltalk.Exporter, [], 'Importer-Exporter');
@@ -629,6 +675,21 @@ referencedClasses: []
 }),
 smalltalk.ChunkExporter);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "exportPackageEpilogueOn:",
+category: 'private',
+fn: function (aStream){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self}, function($ctx1) {$ctx1.fill(self,"exportPackageEpilogueOn:",{aStream:aStream},smalltalk.ChunkExporter)})},
+args: ["aStream"],
+source: "exportPackageEpilogueOn: aStream",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.ChunkExporter);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "exportPackageExtensionsOf:on:",
@@ -675,6 +736,21 @@ referencedClasses: ["Package", "Smalltalk", "Dictionary"]
 }),
 smalltalk.ChunkExporter);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "exportPackagePrologueOn:",
+category: 'private',
+fn: function (aStream){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self}, function($ctx1) {$ctx1.fill(self,"exportPackagePrologueOn:",{aStream:aStream},smalltalk.ChunkExporter)})},
+args: ["aStream"],
+source: "exportPackagePrologueOn: aStream",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.ChunkExporter);
+
 
 
 smalltalk.addClass('StrippedExporter', smalltalk.Exporter, [], 'Importer-Exporter');
@@ -946,3 +1022,4 @@ referencedClasses: ["PackageHandler"]
 }),
 smalltalk.Package);
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Kernel-Announcements.deploy.js

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

+ 2 - 0
js/Kernel-Announcements.js

@@ -1,3 +1,4 @@
+(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.";
@@ -761,3 +762,4 @@ smalltalk.addClass('ProtocolRemoved', smalltalk.ProtocolAnnouncement, [], 'Kerne
 smalltalk.ProtocolRemoved.comment="I am emitted when a protocol is removed from a class.";
 
 
+})(global_smalltalk,global_nil,global__st);

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

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Kernel-Classes');
 smalltalk.addClass('Behavior', smalltalk.Object, [], 'Kernel-Classes');
 smalltalk.addMethod(
@@ -1637,3 +1638,4 @@ messageSends: ["theClass:", "new", "level:", "getNodesFrom:", "yourself"]}),
 smalltalk.ClassSorterNode.klass);
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Kernel-Classes.js

@@ -1,3 +1,4 @@
+(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.";
@@ -2144,3 +2145,4 @@ referencedClasses: []
 smalltalk.ClassSorterNode.klass);
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Kernel-Collections.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Kernel-Collections');
 smalltalk.addClass('Association', smalltalk.Object, ['key', 'value'], 'Kernel-Collections');
 smalltalk.addMethod(
@@ -4284,3 +4285,4 @@ smalltalk.StringStream);
 
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Kernel-Collections.js

@@ -1,3 +1,4 @@
+(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:`";
@@ -5768,3 +5769,4 @@ smalltalk.StringStream);
 
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Kernel-Exceptions.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Kernel-Exceptions');
 smalltalk.addClass('Error', smalltalk.Object, ['messageText'], 'Kernel-Exceptions');
 smalltalk.addMethod(
@@ -451,3 +452,4 @@ messageSends: []}),
 smalltalk.ErrorHandler.klass);
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Kernel-Exceptions.js

@@ -1,3 +1,4 @@
+(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.";
@@ -626,3 +627,4 @@ referencedClasses: []
 smalltalk.ErrorHandler.klass);
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Kernel-Methods.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Kernel-Methods');
 smalltalk.addClass('BlockClosure', smalltalk.Object, [], 'Kernel-Methods');
 smalltalk.addMethod(
@@ -1331,3 +1332,4 @@ messageSends: []}),
 smalltalk.NativeFunction.klass);
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Kernel-Methods.js

@@ -1,3 +1,4 @@
+(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 | ... ] `";
@@ -1803,3 +1804,4 @@ referencedClasses: []
 smalltalk.NativeFunction.klass);
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Kernel-Objects.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Kernel-Objects');
 smalltalk.addClass('Object', smalltalk.nil, [], 'Kernel-Objects');
 smalltalk.addMethod(
@@ -4338,3 +4339,4 @@ return $1;
 messageSends: ["replace:with:"]}),
 smalltalk.String);
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Kernel-Objects.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Kernel-Objects');
 smalltalk.addClass('Object', smalltalk.nil, [], 'Kernel-Objects');
 smalltalk.Object.comment="**I am the root of the Smalltalk class system**. All classes in the system are subclasses of me.\x0a\x0aI provide default behavior common to all normal objects, such as:\x0a\x0a- accessing\x0a- copying\x0a- comparison\x0a- error handling\x0a- message sending\x0a- reflection\x0a\x0aAlso utility messages that all objects should respond to are defined here.\x0a\x0aI have no instance variable.\x0a\x0a##Access\x0a\x0aInstance variables can be accessed with `#instVarAt:` and `#instVarAt:put:`. `#instanceVariableNames` answers a collection of all instance variable names.\x0aAccessing JavaScript properties of an object is done through `#basicAt:`, `#basicAt:put:` and `basicDelete:`.\x0a\x0a##Copying\x0a\x0aCopying an object is handled by `#copy` and `#deepCopy`. The first one performs a shallow copy of the receiver, while the second one performs a deep copy.\x0aThe hook method `#postCopy` can be overriden in subclasses to copy fields as necessary to complete the full copy. It will be sent by the copy of the receiver.\x0a\x0a##Comparison\x0a\x0aI understand equality `#=` and identity `#==` comparison.\x0a\x0a##Error handling\x0a\x0a- `#halt` is the typical message to use for inserting breakpoints during debugging.\x0a- `#error:` throws a generic error exception\x0a- `#doesNotUnderstand:` handles the fact that there was an attempt to send the given message to the receiver but the receiver does not understand this message.\x0a\x09Overriding this message can be useful to implement proxies for example.";
@@ -5925,3 +5926,4 @@ referencedClasses: []
 }),
 smalltalk.String);
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Kernel-Tests.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Kernel-Tests');
 smalltalk.addClass('BlockClosureTest', smalltalk.TestCase, [], 'Kernel-Tests');
 smalltalk.addMethod(
@@ -3788,3 +3789,4 @@ smalltalk.UndefinedTest);
 
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Kernel-Tests.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Kernel-Tests');
 smalltalk.addClass('BlockClosureTest', smalltalk.TestCase, [], 'Kernel-Tests');
 smalltalk.addMethod(
@@ -4795,3 +4796,4 @@ smalltalk.UndefinedTest);
 
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Kernel-Transcript.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Kernel-Transcript');
 smalltalk.addClass('ConsoleTranscript', smalltalk.Object, ['textarea'], 'Kernel-Transcript');
 smalltalk.addMethod(
@@ -150,3 +151,4 @@ messageSends: ["show:", "current"]}),
 smalltalk.Transcript.klass);
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Kernel-Transcript.js

@@ -1,3 +1,4 @@
+(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.";
@@ -217,3 +218,4 @@ referencedClasses: []
 smalltalk.Transcript.klass);
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/SUnit-Tests.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('SUnit-Tests');
 smalltalk.addClass('ExampleSetTest', smalltalk.TestCase, ['empty', 'full'], 'SUnit-Tests');
 smalltalk.addMethod(
@@ -427,3 +428,4 @@ smalltalk.SUnitAsyncTest);
 
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/SUnit-Tests.js

@@ -1,3 +1,4 @@
+(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.";
@@ -543,3 +544,4 @@ smalltalk.SUnitAsyncTest);
 
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/SUnit.deploy.js

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

+ 2 - 0
js/SUnit.js

@@ -1,3 +1,4 @@
+(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.";
@@ -1233,3 +1234,4 @@ referencedClasses: []
 smalltalk.TestSuiteRunner.klass);
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Spaces.deploy.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Spaces');
 smalltalk.addClass('ObjectSpace', smalltalk.Object, ['frame'], 'Spaces');
 smalltalk.addMethod(
@@ -249,3 +250,4 @@ smalltalk.ObjectSpaceTest);
 
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/Spaces.js

@@ -1,3 +1,4 @@
+(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";
@@ -335,3 +336,4 @@ smalltalk.ObjectSpaceTest);
 
 
 
+})(global_smalltalk,global_nil,global__st);

+ 2 - 2
js/amber.js

@@ -206,9 +206,9 @@ amber = (function() {
 
 	// This will be called after JS files have been loaded
 	function initializeSmalltalk() {
-		that.smalltalkReady = function() {
+		that.smalltalkReady = function(smalltalk,nil,_st) {
 			if (spec.ready) {
-				spec.ready();
+				spec.ready(smalltalk,nil,_st);
 			}
 			evaluateSmalltalkScripts();
 		};

+ 39 - 27
js/boot.js

@@ -45,6 +45,18 @@ if(typeof console === "undefined") {
 	};
 }
 
+/* Global Smalltalk objects. */
+// The globals below all begin with `global_' prefix.
+// This prefix is to advice developers to avoid their usage,
+// instead using local versions smalltalk, nil, _st that are
+// provided by appropriate wrappers to each package.
+// The plan is to use different module loader (and slightly change the wrappers)
+// so that these globals are hidden completely inside the exports/imports of the module loader.
+// DO NOT USE DIRECTLY! CAN DISAPPEAR AT ANY TIME.
+var global_smalltalk, global_nil, global__st;
+
+(function () {
+
 /* Array extensions */
 
 Array.prototype.addElement = function(el) {
@@ -101,6 +113,8 @@ inherits(SmalltalkPackageOrganizer, SmalltalkOrganizer);
 inherits(SmalltalkClassOrganizer, SmalltalkOrganizer);
 
 
+var nil = global_nil = new SmalltalkNil();
+
 function Smalltalk() {
 
 	var st = this;
@@ -196,7 +210,7 @@ function Smalltalk() {
 	}
 
 	/* Smalltalk class creation. A class is an instance of an automatically
-		created metaclass object. Newly created classes (not their metaclass) 
+		created metaclass object. Newly created classes (not their metaclass)
 		should be added to the smalltalk object, see smalltalk.addClass().
 		Superclass linking is *not* handled here, see smalltalk.init()  */
 
@@ -412,7 +426,7 @@ function Smalltalk() {
 		subclasses.forEach(function(subclass) {
 			result.push.apply(result, st.allSubclasses(subclass));
 		});
-	
+
 		return result;
 	};
 
@@ -510,10 +524,10 @@ function Smalltalk() {
 			}
 			return new_addMethod(klass_exMethod, exKlass);
 		}
-	
+
 		return new_addMethod(method_exJsSelector, klass_exMethod);
 	};
-	
+
 	// later, st.addMethod can be this:
 	function new_addMethod(method, klass) {
 		if (!(method.jsSelector)) {
@@ -526,7 +540,7 @@ function Smalltalk() {
 		// During the bootstrap, #addCompiledMethod is not used.
 		// Therefore we populate the organizer here too
 		klass.organization.elements.addElement(method.category);
-	
+
 		// If already initialized (else it will be done later anyway),
 		// re-initialize all subclasses to ensure the new method
 		// propagation (for wrapped classes, not using the prototype
@@ -536,7 +550,7 @@ function Smalltalk() {
 				st.initClass(subclass);
 			});
 		}
-	
+
 		for(var i=0; i<method.messageSends.length; i++) {
 			var dnuHandler = dnu.get(method.messageSends[i]);
 			if(initialized) {
@@ -640,7 +654,7 @@ function Smalltalk() {
 
 		Converts keyword-based selectors by using the first
 		keyword only, but keeping all message arguments.
-		
+
 		Example:
 		"self do: aBlock with: anObject" -> "self.do(aBlock, anObject)" */
 
@@ -673,8 +687,7 @@ function Smalltalk() {
 	};
 
 	function pushContext(setup) {
-		st.thisContext = new SmalltalkMethodContext(smalltalk.thisContext, setup);
-		return st.thisContext;
+		return st.thisContext = new SmalltalkMethodContext(st.thisContext, setup);
 	}
 
 	function popContext(context) {
@@ -758,18 +771,18 @@ function Smalltalk() {
 
 	/* Boolean assertion */
 	st.assert = function(shouldBeBoolean) {
-		if ((undefined !== shouldBeBoolean) && (shouldBeBoolean.klass === smalltalk.Boolean)) {
+		if ((undefined !== shouldBeBoolean) && (shouldBeBoolean.klass === st.Boolean)) {
 			return (shouldBeBoolean == true);
 		} else {
-			smalltalk.NonBooleanReceiver._new()._object_(shouldBeBoolean)._signal();
+			st.NonBooleanReceiver._new()._object_(shouldBeBoolean)._signal();
 		}
-    };
+	};
 
 	/* Backward compatibility with Amber 0.9.1 */
 	st.symbolFor = function(aString) { return aString; };
-	
+
 	/* Smalltalk initialization. Called on page load */
-	
+
 	st.initialize = function() {
 		if(initialized) { return; }
 
@@ -779,13 +792,17 @@ function Smalltalk() {
 		classes.forEach(function(klass) {
 			klass._initialize();
 		});
-	
+
 		initialized = true;
 	};
 }
 
 inherits(Smalltalk, SmalltalkObject);
 
+if(this.jQuery) {
+	this.jQuery.allowJavaScriptCalls = true;
+}
+
 function SmalltalkMethodContext(home, setup) {
 	this.homeContext = home;
 	this.setup       = setup || function() {};
@@ -800,6 +817,8 @@ SmalltalkMethodContext.prototype.lookupClass = null;
 
 inherits(SmalltalkMethodContext, SmalltalkObject);
 
+var smalltalk = global_smalltalk = new Smalltalk();
+
 SmalltalkMethodContext.prototype.fill = function(receiver, selector, locals, lookupClass) {
 	this.receiver    = receiver;
 	this.selector    = selector;
@@ -819,7 +838,7 @@ SmalltalkMethodContext.prototype.init = function() {
 		home = home.init();
 	}
 
-    this.setup(this);
+	this.setup(this);
 };
 
 SmalltalkMethodContext.prototype.method = function() {
@@ -832,25 +851,16 @@ SmalltalkMethodContext.prototype.method = function() {
 	return method;
 };
 
-/* Global Smalltalk objects. */
-
-var nil = new SmalltalkNil();
-var smalltalk = new Smalltalk();
-
-if(this.jQuery) {
-	this.jQuery.allowJavaScriptCalls = true;
-}
-
 /*
  * Answer the smalltalk representation of o.
  * Used in message sends
  */
 
-var _st = function(o) {
+global__st = function(o) {
 	if(o == null) {return nil;}
 	if(o.klass) {return o;}
 	return smalltalk.JSObjectProxy._on_(o);
-}; 
+};
 
 
 /***************************************** BOOTSTRAP ******************************************/
@@ -892,3 +902,5 @@ smalltalk.wrapClassName("MethodContext", "Kernel-Methods", SmalltalkMethodContex
 
 smalltalk.alias(smalltalk.Array, "OrderedCollection");
 smalltalk.alias(smalltalk.Date, "Time");
+
+})();

+ 3 - 3
js/init.js

@@ -1,4 +1,4 @@
-(function () {
+(function (smalltalk,nil,_st) {
     var inBrowser = typeof amber !== "undefined" && typeof amber.load === "function";
     function init() {
         smalltalk.initialize();
@@ -6,7 +6,7 @@
         /* Similar to jQuery(document).ready() */
 
         if (inBrowser && amber.smalltalkReady) {
-            amber.smalltalkReady();
+            amber.smalltalkReady(smalltalk,nil,_st);
         }
     }
 
@@ -23,4 +23,4 @@
         // immediately after init, so it must happens synchronously.
         init();
     }
-})();
+})(global_smalltalk,global_nil,global__st);

+ 2 - 0
js/parser.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil){
 smalltalk.parser = (function(){
   /*
    * Generated by PEG.js 0.7.0.
@@ -4181,3 +4182,4 @@ smalltalk.parser = (function(){
   
   return result;
 })();
+})(global_smalltalk,global_nil);

+ 28 - 5
st/Importer-Exporter.st

@@ -89,14 +89,19 @@ exportPackage: packageName
 
 	| package |
 	^String streamContents: [:stream |
-				package := Smalltalk current packageAt: packageName.
-				self exportPackageDefinitionOf: package on: stream.
+		self exportPackagePrologueOn: stream.
+		[
+			package := Smalltalk current packageAt: packageName.
+			self exportPackageDefinitionOf: package on: stream.
 
-		"Export classes in dependency order.
-		Update (issue #171): Remove duplicates for export"
+			"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]
+			self exportPackageExtensionsOf: package on: stream
+		] ensure: [
+			self exportPackageEpilogueOn: stream
+		]]
 ! !
 
 !Exporter methodsFor: 'private'!
@@ -180,6 +185,12 @@ exportPackageDefinitionOf: package on: aStream
 		lf
 !
 
+exportPackageEpilogueOn: aStream
+	aStream
+		nextPutAll: '})(global_smalltalk,global_nil,global__st);';
+		lf
+!
+
 exportPackageExtensionsOf: package on: aStream
 	"Issue #143: sort classes and methods alphabetically"
 
@@ -190,6 +201,12 @@ exportPackageExtensionsOf: package on: aStream
 			((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
+	aStream
+		nextPutAll: '(function(smalltalk,nil,_st){';
+		lf
 ! !
 
 Exporter subclass: #ChunkExporter
@@ -291,6 +308,9 @@ exportPackageDefinitionOf: package on: aStream
 		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
@@ -308,6 +328,9 @@ exportPackageExtensionsOf: package on: aStream
 			(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

+ 2 - 0
test/Test.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Test');
 smalltalk.addClass('NodeTestRunner', smalltalk.Object, [], 'Test');
 
@@ -67,3 +68,4 @@ referencedClasses: ["OrderedCollection", "TestCase", "TestSuiteRunner", "ResultA
 smalltalk.NodeTestRunner.klass);
 
 
+})(global_smalltalk,global_nil,global__st);