Kaynağa Gözat

Consistency across Helios:

* Merge subscribeTo: and #observeBlah
* Use HLCodeModel/HLCodeWidget everywhere
* merge HLWidget rootDiv with the #wrapper of inspector and workspace
* rename widget classes adding Widget suffix
Nicolas Petton 11 yıl önce
ebeveyn
işleme
d43ad40f63

+ 32 - 30
js/Helios-Announcements.deploy.js

@@ -7,9 +7,9 @@ smalltalk.addMethod(
 "_code",
 smalltalk.method({
 selector: "code",
-fn: function (){
-var self=this;
-return self["@code"];
+fn: function () {
+    var self = this;
+    return self['@code'];
 }
 }),
 smalltalk.HLCodeHandled);
@@ -18,10 +18,11 @@ smalltalk.addMethod(
 "_code_",
 smalltalk.method({
 selector: "code:",
-fn: function (aModel){
-var self=this;
-self["@code"]=aModel;
-return self}
+fn: function (aModel) {
+    var self = this;
+    self['@code'] = aModel;
+    return self;
+}
 }),
 smalltalk.HLCodeHandled);
 
@@ -30,14 +31,14 @@ smalltalk.addMethod(
 "_on_",
 smalltalk.method({
 selector: "on:",
-fn: function (aCodeModel){
-var self=this;
-var $2,$3,$1;
-$2=smalltalk.send(self,"_new",[]);
-smalltalk.send($2,"_code_",[aCodeModel]);
-$3=smalltalk.send($2,"_yourself",[]);
-$1=$3;
-return $1;
+fn: function (aCodeModel) {
+    var self = this;
+    var $2, $3, $1;
+    $2 = smalltalk.send(self, "_new", []);
+    smalltalk.send($2, "_code_", [aCodeModel]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 }
 }),
 smalltalk.HLCodeHandled.klass);
@@ -63,9 +64,9 @@ smalltalk.addMethod(
 "_item",
 smalltalk.method({
 selector: "item",
-fn: function (){
-var self=this;
-return self["@item"];
+fn: function () {
+    var self = this;
+    return self['@item'];
 }
 }),
 smalltalk.HLItemSelected);
@@ -74,10 +75,11 @@ smalltalk.addMethod(
 "_item_",
 smalltalk.method({
 selector: "item:",
-fn: function (anObject){
-var self=this;
-self["@item"]=anObject;
-return self}
+fn: function (anObject) {
+    var self = this;
+    self['@item'] = anObject;
+    return self;
+}
 }),
 smalltalk.HLItemSelected);
 
@@ -86,14 +88,14 @@ smalltalk.addMethod(
 "_on_",
 smalltalk.method({
 selector: "on:",
-fn: function (anItem){
-var self=this;
-var $2,$3,$1;
-$2=smalltalk.send(self,"_new",[]);
-smalltalk.send($2,"_item_",[anItem]);
-$3=smalltalk.send($2,"_yourself",[]);
-$1=$3;
-return $1;
+fn: function (anItem) {
+    var self = this;
+    var $2, $3, $1;
+    $2 = smalltalk.send(self, "_new", []);
+    smalltalk.send($2, "_item_", [anItem]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 }
 }),
 smalltalk.HLItemSelected.klass);

+ 32 - 30
js/Helios-Announcements.js

@@ -8,9 +8,9 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "code",
 category: 'accessing',
-fn: function (){
-var self=this;
-return self["@code"];
+fn: function () {
+    var self = this;
+    return self['@code'];
 },
 args: [],
 source: "code\x0a\x0a\x09^ code",
@@ -24,10 +24,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "code:",
 category: 'accessing',
-fn: function (aModel){
-var self=this;
-self["@code"]=aModel;
-return self},
+fn: function (aModel) {
+    var self = this;
+    self['@code'] = aModel;
+    return self;
+},
 args: ["aModel"],
 source: "code: aModel\x0a\x0a\x09code := aModel",
 messageSends: [],
@@ -41,14 +42,14 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "on:",
 category: 'actions',
-fn: function (aCodeModel){
-var self=this;
-var $2,$3,$1;
-$2=smalltalk.send(self,"_new",[]);
-smalltalk.send($2,"_code_",[aCodeModel]);
-$3=smalltalk.send($2,"_yourself",[]);
-$1=$3;
-return $1;
+fn: function (aCodeModel) {
+    var self = this;
+    var $2, $3, $1;
+    $2 = smalltalk.send(self, "_new", []);
+    smalltalk.send($2, "_code_", [aCodeModel]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 },
 args: ["aCodeModel"],
 source: "on: aCodeModel\x0a\x0a\x09^ self new \x0a    \x09code: aCodeModel;\x0a        yourself",
@@ -79,9 +80,9 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "item",
 category: 'accessing',
-fn: function (){
-var self=this;
-return self["@item"];
+fn: function () {
+    var self = this;
+    return self['@item'];
 },
 args: [],
 source: "item\x0a\x09^ item",
@@ -95,10 +96,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "item:",
 category: 'accessing',
-fn: function (anObject){
-var self=this;
-self["@item"]=anObject;
-return self},
+fn: function (anObject) {
+    var self = this;
+    self['@item'] = anObject;
+    return self;
+},
 args: ["anObject"],
 source: "item: anObject\x0a\x09item := anObject",
 messageSends: [],
@@ -112,14 +114,14 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "on:",
 category: 'instance creation',
-fn: function (anItem){
-var self=this;
-var $2,$3,$1;
-$2=smalltalk.send(self,"_new",[]);
-smalltalk.send($2,"_item_",[anItem]);
-$3=smalltalk.send($2,"_yourself",[]);
-$1=$3;
-return $1;
+fn: function (anItem) {
+    var self = this;
+    var $2, $3, $1;
+    $2 = smalltalk.send(self, "_new", []);
+    smalltalk.send($2, "_item_", [anItem]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 },
 args: ["anItem"],
 source: "on: anItem\x0a\x09^ self new\x0a    \x09item: anItem;\x0a        yourself",

+ 330 - 286
js/Helios-Browser.deploy.js

@@ -256,7 +256,18 @@ selector: "model:",
 fn: function (aBrowserModel) {
     var self = this;
     self['@model'] = aBrowserModel;
-    smalltalk.send(self['@model'], "_subscribe_", [self]);
+    smalltalk.send(self, "_observeModel", []);
+    return self;
+}
+}),
+smalltalk.HLBrowserListWidget);
+
+smalltalk.addMethod(
+"_observeModel",
+smalltalk.method({
+selector: "observeModel",
+fn: function () {
+    var self = this;
     return self;
 }
 }),
@@ -350,9 +361,37 @@ fn: function (aClass) {
 smalltalk.HLClassesListWidget);
 
 smalltalk.addMethod(
-"_packageSelected_",
+"_observeModel",
 smalltalk.method({
-selector: "packageSelected:",
+selector: "observeModel",
+fn: function () {
+    var self = this;
+    var $1, $2;
+    $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []);
+    smalltalk.send($1, "_on_do_", [smalltalk.HLPackageSelected || HLPackageSelected, function (ann) {return smalltalk.send(self, "_onPackageSelected_", [smalltalk.send(ann, "_item", [])]);}]);
+    smalltalk.send($1, "_on_do_", [smalltalk.HLShowInstanceToggled || HLShowInstanceToggled, function (ann) {return smalltalk.send(self, "_onShowInstanceToggled", []);}]);
+    $2 = smalltalk.send($1, "_on_do_", [smalltalk.HLClassSelected || HLClassSelected, function (ann) {return smalltalk.send(self, "_onClassSelected_", [smalltalk.send(ann, "_item", [])]);}]);
+    return self;
+}
+}),
+smalltalk.HLClassesListWidget);
+
+smalltalk.addMethod(
+"_onClassSelected_",
+smalltalk.method({
+selector: "onClassSelected:",
+fn: function (aClass) {
+    var self = this;
+    smalltalk.send(self, "_focus", []);
+    return self;
+}
+}),
+smalltalk.HLClassesListWidget);
+
+smalltalk.addMethod(
+"_onPackageSelected_",
+smalltalk.method({
+selector: "onPackageSelected:",
 fn: function (aPackage) {
     var self = this;
     var $1;
@@ -369,6 +408,18 @@ fn: function (aPackage) {
 }),
 smalltalk.HLClassesListWidget);
 
+smalltalk.addMethod(
+"_onShowInstanceToggled",
+smalltalk.method({
+selector: "onShowInstanceToggled",
+fn: function () {
+    var self = this;
+    smalltalk.send(self, "_refresh", []);
+    return self;
+}
+}),
+smalltalk.HLClassesListWidget);
+
 smalltalk.addMethod(
 "_renderButtonsOn_",
 smalltalk.method({
@@ -460,11 +511,12 @@ smalltalk.addMethod(
 "_selectItem_",
 smalltalk.method({
 selector: "selectItem:",
-fn: function (aClass){
-var self=this;
-smalltalk.send(self,"_selectItem_",[aClass],smalltalk.HLBrowserListWidget);
-smalltalk.send(smalltalk.send(self,"_model",[]),"_selectedClass_",[aClass]);
-return self}
+fn: function (aClass) {
+    var self = this;
+    smalltalk.send(self, "_selectItem_", [aClass], smalltalk.HLBrowserListWidget);
+    smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass_", [aClass]);
+    return self;
+}
 }),
 smalltalk.HLClassesListWidget);
 
@@ -493,20 +545,6 @@ fn: function (aBoolean) {
 }),
 smalltalk.HLClassesListWidget);
 
-smalltalk.addMethod(
-"_subscribeTo_",
-smalltalk.method({
-selector: "subscribeTo:",
-fn: function (anAnnouncer) {
-    var self = this;
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLPackageSelected || HLPackageSelected, function (ann) {return smalltalk.send(self, "_packageSelected_", [smalltalk.send(ann, "_item", [])]);}]);
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLShowInstanceToggled || HLShowInstanceToggled, function (ann) {return smalltalk.send(self, "_refresh", []);}]);
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLClassSelected || HLClassSelected, function (ann) {return smalltalk.send(self, "_focus", []);}]);
-    return self;
-}
-}),
-smalltalk.HLClassesListWidget);
-
 
 
 smalltalk.addClass('HLMethodsListWidget', smalltalk.HLBrowserListWidget, ['selectorsCache'], 'Helios-Browser');
@@ -621,6 +659,57 @@ fn: function (aString) {
 }),
 smalltalk.HLMethodsListWidget);
 
+smalltalk.addMethod(
+"_observeModel",
+smalltalk.method({
+selector: "observeModel",
+fn: function () {
+    var self = this;
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLProtocolSelected || HLProtocolSelected, function (ann) {return smalltalk.send(self, "_onProtocolSelected_", [smalltalk.send(ann, "_item", [])]);}]);
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLShowInstanceToggled || HLShowInstanceToggled, function (ann) {return smalltalk.send(self, "_onProtocolSelected_", [nil]);}]);
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLMethodSelected || HLMethodSelected, function (ann) {return smalltalk.send(self, "_onMethodSelected_", [smalltalk.send(ann, "_item", [])]);}]);
+    return self;
+}
+}),
+smalltalk.HLMethodsListWidget);
+
+smalltalk.addMethod(
+"_onMethodSelected_",
+smalltalk.method({
+selector: "onMethodSelected:",
+fn: function (aMethod) {
+    var self = this;
+    smalltalk.send(self, "_focus", []);
+    return self;
+}
+}),
+smalltalk.HLMethodsListWidget);
+
+smalltalk.addMethod(
+"_onProtocolSelected_",
+smalltalk.method({
+selector: "onProtocolSelected:",
+fn: function (aString) {
+    var self = this;
+    var $2, $1;
+    smalltalk.send(self, "_selectedItem_", [nil]);
+    $2 = smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []);
+    if (($receiver = $2) == nil || $receiver == undefined) {
+        $1 = [];
+    } else {
+        if (($receiver = aString) == nil || $receiver == undefined) {
+            $1 = [];
+        } else {
+            $1 = smalltalk.send(self, "_methodsInProtocol_", [aString]);
+        }
+    }
+    smalltalk.send(self, "_items_", [$1]);
+    smalltalk.send(self, "_refresh", []);
+    return self;
+}
+}),
+smalltalk.HLMethodsListWidget);
+
 smalltalk.addMethod(
 "_overrideSelectors",
 smalltalk.method({
@@ -647,30 +736,6 @@ fn: function () {
 }),
 smalltalk.HLMethodsListWidget);
 
-smalltalk.addMethod(
-"_protocolSelected_",
-smalltalk.method({
-selector: "protocolSelected:",
-fn: function (aString){
-var self=this;
-var $2,$1;
-smalltalk.send(self,"_selectedItem_",[nil]);
-$2=smalltalk.send(smalltalk.send(self,"_model",[]),"_selectedClass",[]);
-if(($receiver = $2) == nil || $receiver == undefined){
-$1=[];
-} else {
-if(($receiver = aString) == nil || $receiver == undefined){
-$1=[];
-} else {
-$1=smalltalk.send(self,"_methodsInProtocol_",[aString]);
-};
-};
-smalltalk.send(self,"_items_",[$1]);
-smalltalk.send(self,"_refresh",[]);
-return self}
-}),
-smalltalk.HLMethodsListWidget);
-
 smalltalk.addMethod(
 "_renderContentOn_",
 smalltalk.method({
@@ -708,11 +773,12 @@ smalltalk.addMethod(
 "_selectItem_",
 smalltalk.method({
 selector: "selectItem:",
-fn: function (aCompiledMethod){
-var self=this;
-smalltalk.send(self,"_selectItem_",[aCompiledMethod],smalltalk.HLBrowserListWidget);
-smalltalk.send(smalltalk.send(self,"_model",[]),"_selectedMethod_",[aCompiledMethod]);
-return self}
+fn: function (aCompiledMethod) {
+    var self = this;
+    smalltalk.send(self, "_selectItem_", [aCompiledMethod], smalltalk.HLBrowserListWidget);
+    smalltalk.send(smalltalk.send(self, "_model", []), "_selectedMethod_", [aCompiledMethod]);
+    return self;
+}
 }),
 smalltalk.HLMethodsListWidget);
 
@@ -727,20 +793,6 @@ fn: function () {
 }),
 smalltalk.HLMethodsListWidget);
 
-smalltalk.addMethod(
-"_subscribeTo_",
-smalltalk.method({
-selector: "subscribeTo:",
-fn: function (anAnnouncer) {
-    var self = this;
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLProtocolSelected || HLProtocolSelected, function (ann) {return smalltalk.send(self, "_protocolSelected_", [smalltalk.send(ann, "_item", [])]);}]);
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLShowInstanceToggled || HLShowInstanceToggled, function (ann) {return smalltalk.send(self, "_protocolSelected_", [nil]);}]);
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLMethodSelected || HLMethodSelected, function (ann) {return smalltalk.send(self, "_focus", []);}]);
-    return self;
-}
-}),
-smalltalk.HLMethodsListWidget);
-
 
 
 smalltalk.addClass('HLPackagesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
@@ -760,14 +812,12 @@ smalltalk.addMethod(
 "_initializeItems",
 smalltalk.method({
 selector: "initializeItems",
-fn: function (){
-var self=this;
-var $1;
-self["@items"]=smalltalk.send(smalltalk.send(smalltalk.send(self,"_model",[]),"_packages",[]),"_sort_",[(function(a,b){
-return smalltalk.send(smalltalk.send(a,"_name",[]),"__lt",[smalltalk.send(b,"_name",[])]);
-})]);
-$1=self["@items"];
-return $1;
+fn: function () {
+    var self = this;
+    var $1;
+    self['@items'] = smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_packages", []), "_sort_", [function (a, b) {return smalltalk.send(smalltalk.send(a, "_name", []), "__lt", [smalltalk.send(b, "_name", [])]);}]);
+    $1 = self['@items'];
+    return $1;
 }
 }),
 smalltalk.HLPackagesListWidget);
@@ -776,15 +826,39 @@ smalltalk.addMethod(
 "_items",
 smalltalk.method({
 selector: "items",
-fn: function (){
-var self=this;
-var $1;
-if(($receiver = self["@items"]) == nil || $receiver == undefined){
-$1=smalltalk.send(self,"_initializeItems",[]);
-} else {
-$1=self["@items"];
-};
-return $1;
+fn: function () {
+    var self = this;
+    var $1;
+    if (($receiver = self['@items']) == nil || $receiver == undefined) {
+        $1 = smalltalk.send(self, "_initializeItems", []);
+    } else {
+        $1 = self['@items'];
+    }
+    return $1;
+}
+}),
+smalltalk.HLPackagesListWidget);
+
+smalltalk.addMethod(
+"_observeModel",
+smalltalk.method({
+selector: "observeModel",
+fn: function () {
+    var self = this;
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLPackageSelected || HLPackageSelected, function (ann) {return smalltalk.send(self, "_onPackageSelected_", [smalltalk.send(ann, "_item", [])]);}]);
+    return self;
+}
+}),
+smalltalk.HLPackagesListWidget);
+
+smalltalk.addMethod(
+"_onPackageSelected_",
+smalltalk.method({
+selector: "onPackageSelected:",
+fn: function (aPackage) {
+    var self = this;
+    smalltalk.send(self, "_focus", []);
+    return self;
 }
 }),
 smalltalk.HLPackagesListWidget);
@@ -815,21 +889,10 @@ smalltalk.addMethod(
 "_selectItem_",
 smalltalk.method({
 selector: "selectItem:",
-fn: function (aPackage){
-var self=this;
-smalltalk.send(self,"_selectItem_",[aPackage],smalltalk.HLBrowserListWidget);
-smalltalk.send(smalltalk.send(self,"_model",[]),"_selectedPackage_",[aPackage]);
-return self}
-}),
-smalltalk.HLPackagesListWidget);
-
-smalltalk.addMethod(
-"_subscribeTo_",
-smalltalk.method({
-selector: "subscribeTo:",
-fn: function (anAnnouncer) {
+fn: function (aPackage) {
     var self = this;
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLPackageSelected || HLPackageSelected, function (ann) {return smalltalk.send(self, "_focus", []);}]);
+    smalltalk.send(self, "_selectItem_", [aPackage], smalltalk.HLBrowserListWidget);
+    smalltalk.send(smalltalk.send(self, "_model", []), "_selectedPackage_", [aPackage]);
     return self;
 }
 }),
@@ -852,9 +915,23 @@ fn: function () {
 smalltalk.HLProtocolsListWidget);
 
 smalltalk.addMethod(
-"_classSelected_",
+"_observeModel",
+smalltalk.method({
+selector: "observeModel",
+fn: function () {
+    var self = this;
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLClassSelected || HLClassSelected, function (ann) {return smalltalk.send(self, "_onClassSelected_", [smalltalk.send(ann, "_item", [])]);}]);
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLShowInstanceToggled || HLShowInstanceToggled, function (ann) {return smalltalk.send(self, "_onClassSelected_", [smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", [])]);}]);
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLProtocolSelected || HLProtocolSelected, function (ann) {return smalltalk.send(self, "_onProtocolSelected_", [smalltalk.send(ann, "_item", [])]);}]);
+    return self;
+}
+}),
+smalltalk.HLProtocolsListWidget);
+
+smalltalk.addMethod(
+"_onClassSelected_",
 smalltalk.method({
-selector: "classSelected:",
+selector: "onClassSelected:",
 fn: function (aClass) {
     var self = this;
     var $2, $3, $1;
@@ -874,6 +951,18 @@ fn: function (aClass) {
 }),
 smalltalk.HLProtocolsListWidget);
 
+smalltalk.addMethod(
+"_onProtocolSelected_",
+smalltalk.method({
+selector: "onProtocolSelected:",
+fn: function (aString) {
+    var self = this;
+    smalltalk.send(self, "_focus", []);
+    return self;
+}
+}),
+smalltalk.HLProtocolsListWidget);
+
 smalltalk.addMethod(
 "_renderContentOn_",
 smalltalk.method({
@@ -898,11 +987,12 @@ smalltalk.addMethod(
 "_selectItem_",
 smalltalk.method({
 selector: "selectItem:",
-fn: function (aString){
-var self=this;
-smalltalk.send(self,"_selectItem_",[aString],smalltalk.HLBrowserListWidget);
-smalltalk.send(smalltalk.send(self,"_model",[]),"_selectedProtocol_",[aString]);
-return self}
+fn: function (aString) {
+    var self = this;
+    smalltalk.send(self, "_selectItem_", [aString], smalltalk.HLBrowserListWidget);
+    smalltalk.send(smalltalk.send(self, "_model", []), "_selectedProtocol_", [aString]);
+    return self;
+}
 }),
 smalltalk.HLProtocolsListWidget);
 
@@ -910,25 +1000,11 @@ smalltalk.addMethod(
 "_selectedItem",
 smalltalk.method({
 selector: "selectedItem",
-fn: function (){
-var self=this;
-var $1;
-$1=smalltalk.send(self,"_selectedItem",[],smalltalk.HLBrowserListWidget);
-return $1;
-}
-}),
-smalltalk.HLProtocolsListWidget);
-
-smalltalk.addMethod(
-"_subscribeTo_",
-smalltalk.method({
-selector: "subscribeTo:",
-fn: function (anAnnouncer) {
+fn: function () {
     var self = this;
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLClassSelected || HLClassSelected, function (ann) {return smalltalk.send(self, "_classSelected_", [smalltalk.send(ann, "_item", [])]);}]);
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLShowInstanceToggled || HLShowInstanceToggled, function (ann) {return smalltalk.send(self, "_classSelected_", [smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", [])]);}]);
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLProtocolSelected || HLProtocolSelected, function (ann) {return smalltalk.send(self, "_focus", []);}]);
-    return self;
+    var $1;
+    $1 = smalltalk.send(self, "_selectedItem", [], smalltalk.HLBrowserListWidget);
+    return $1;
 }
 }),
 smalltalk.HLProtocolsListWidget);
@@ -965,40 +1041,19 @@ fn: function () {
 }),
 smalltalk.HLBrowserModel);
 
-smalltalk.addMethod(
-"_beLocal",
-smalltalk.method({
-selector: "beLocal",
-fn: function (){
-var self=this;
-smalltalk.send(self,"_initializeEnvironment",[]);
-return self}
-}),
-smalltalk.HLBrowserModel);
-
-smalltalk.addMethod(
-"_beRemoteOn_port_",
-smalltalk.method({
-selector: "beRemoteOn:port:",
-fn: function (anIPAddress,aPort){
-var self=this;
-return self}
-}),
-smalltalk.HLBrowserModel);
-
 smalltalk.addMethod(
 "_environment",
 smalltalk.method({
 selector: "environment",
-fn: function (){
-var self=this;
-var $1;
-if(($receiver = self["@environment"]) == nil || $receiver == undefined){
-$1=smalltalk.send(self,"_initializeEnvironment",[]);
-} else {
-$1=self["@environment"];
-};
-return $1;
+fn: function () {
+    var self = this;
+    var $1;
+    if (($receiver = self['@environment']) == nil || $receiver == undefined) {
+        $1 = smalltalk.send(smalltalk.send(smalltalk.HLManager || HLManager, "_current", []), "_environment", []);
+    } else {
+        $1 = self['@environment'];
+    }
+    return $1;
 }
 }),
 smalltalk.HLBrowserModel);
@@ -1015,20 +1070,6 @@ fn: function (anEnvironment) {
 }),
 smalltalk.HLBrowserModel);
 
-smalltalk.addMethod(
-"_initializeEnvironment",
-smalltalk.method({
-selector: "initializeEnvironment",
-fn: function (){
-var self=this;
-var $1;
-self["@environment"]=smalltalk.send((smalltalk.HLLocalEnvironment || HLLocalEnvironment),"_new",[]);
-$1=self["@environment"];
-return $1;
-}
-}),
-smalltalk.HLBrowserModel);
-
 smalltalk.addMethod(
 "_packages",
 smalltalk.method({
@@ -1057,30 +1098,30 @@ smalltalk.addMethod(
 "_selectedClass_",
 smalltalk.method({
 selector: "selectedClass:",
-fn: function (aClass){
-var self=this;
-var $1,$2,$3;
-$1=smalltalk.send(self["@selectedClass"],"__eq",[aClass]);
-if(! smalltalk.assert($1)){
-if(($receiver = aClass) == nil || $receiver == undefined){
-self["@selectedClass"]=nil;
-self["@selectedClass"];
-} else {
-$2=smalltalk.send(self,"_showInstance",[]);
-if(smalltalk.assert($2)){
-self["@selectedClass"]=smalltalk.send(aClass,"_theNonMetaClass",[]);
-self["@selectedClass"];
-} else {
-self["@selectedClass"]=smalltalk.send(aClass,"_theMetaClass",[]);
-self["@selectedClass"];
-};
-};
-smalltalk.send(self,"_selectedMethod_",[nil]);
-$3=smalltalk.send(self,"_selectedProtocol_",[nil]);
-$3;
-};
-smalltalk.send(smalltalk.send(self,"_announcer",[]),"_announce_",[smalltalk.send((smalltalk.HLClassSelected || HLClassSelected),"_on_",[smalltalk.send(self,"_selectedClass",[])])]);
-return self}
+fn: function (aClass) {
+    var self = this;
+    var $1, $2, $3;
+    $1 = smalltalk.send(self['@selectedClass'], "__eq", [aClass]);
+    if (!smalltalk.assert($1)) {
+        if (($receiver = aClass) == nil || $receiver == undefined) {
+            self['@selectedClass'] = nil;
+            self['@selectedClass'];
+        } else {
+            $2 = smalltalk.send(self, "_showInstance", []);
+            if (smalltalk.assert($2)) {
+                self['@selectedClass'] = smalltalk.send(aClass, "_theNonMetaClass", []);
+                self['@selectedClass'];
+            } else {
+                self['@selectedClass'] = smalltalk.send(aClass, "_theMetaClass", []);
+                self['@selectedClass'];
+            }
+        }
+        smalltalk.send(self, "_selectedMethod_", [nil]);
+        $3 = smalltalk.send(self, "_selectedProtocol_", [nil]);
+    }
+    smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLClassSelected || HLClassSelected, "_on_", [smalltalk.send(self, "_selectedClass", [])])]);
+    return self;
+}
 }),
 smalltalk.HLBrowserModel);
 
@@ -1099,16 +1140,17 @@ smalltalk.addMethod(
 "_selectedMethod_",
 smalltalk.method({
 selector: "selectedMethod:",
-fn: function (aCompiledMethod){
-var self=this;
-var $1;
-$1=smalltalk.send(self["@selectedMethod"],"__eq",[aCompiledMethod]);
-if(! smalltalk.assert($1)){
-self["@selectedMethod"]=aCompiledMethod;
-self["@selectedMethod"];
-};
-smalltalk.send(smalltalk.send(self,"_announcer",[]),"_announce_",[smalltalk.send((smalltalk.HLMethodSelected || HLMethodSelected),"_on_",[aCompiledMethod])]);
-return self}
+fn: function (aCompiledMethod) {
+    var self = this;
+    var $1;
+    $1 = smalltalk.send(self['@selectedMethod'], "__eq", [aCompiledMethod]);
+    if (!smalltalk.assert($1)) {
+        self['@selectedMethod'] = aCompiledMethod;
+        self['@selectedMethod'];
+    }
+    smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLMethodSelected || HLMethodSelected, "_on_", [aCompiledMethod])]);
+    return self;
+}
 }),
 smalltalk.HLBrowserModel);
 
@@ -1127,17 +1169,18 @@ smalltalk.addMethod(
 "_selectedPackage_",
 smalltalk.method({
 selector: "selectedPackage:",
-fn: function (aPackage){
-var self=this;
-var $1;
-$1=smalltalk.send(self["@selectedPackage"],"__eq",[aPackage]);
-if(! smalltalk.assert($1)){
-self["@selectedPackage"]=aPackage;
-self["@selectedPackage"];
-smalltalk.send(self,"_selectedClass_",[nil]);
-};
-smalltalk.send(smalltalk.send(self,"_announcer",[]),"_announce_",[smalltalk.send((smalltalk.HLPackageSelected || HLPackageSelected),"_on_",[aPackage])]);
-return self}
+fn: function (aPackage) {
+    var self = this;
+    var $1;
+    $1 = smalltalk.send(self['@selectedPackage'], "__eq", [aPackage]);
+    if (!smalltalk.assert($1)) {
+        self['@selectedPackage'] = aPackage;
+        self['@selectedPackage'];
+        smalltalk.send(self, "_selectedClass_", [nil]);
+    }
+    smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLPackageSelected || HLPackageSelected, "_on_", [aPackage])]);
+    return self;
+}
 }),
 smalltalk.HLBrowserModel);
 
@@ -1156,17 +1199,18 @@ smalltalk.addMethod(
 "_selectedProtocol_",
 smalltalk.method({
 selector: "selectedProtocol:",
-fn: function (aString){
-var self=this;
-var $1;
-$1=smalltalk.send(self["@selectedProtocol"],"__eq",[aString]);
-if(! smalltalk.assert($1)){
-self["@selectedProtocol"]=aString;
-self["@selectedProtocol"];
-smalltalk.send(self,"_selectedMethod_",[nil]);
-};
-smalltalk.send(smalltalk.send(self,"_announcer",[]),"_announce_",[smalltalk.send((smalltalk.HLProtocolSelected || HLProtocolSelected),"_on_",[aString])]);
-return self}
+fn: function (aString) {
+    var self = this;
+    var $1;
+    $1 = smalltalk.send(self['@selectedProtocol'], "__eq", [aString]);
+    if (!smalltalk.assert($1)) {
+        self['@selectedProtocol'] = aString;
+        self['@selectedProtocol'];
+        smalltalk.send(self, "_selectedMethod_", [nil]);
+    }
+    smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLProtocolSelected || HLProtocolSelected, "_on_", [aString])]);
+    return self;
+}
 }),
 smalltalk.HLBrowserModel);
 
@@ -1259,34 +1303,34 @@ smalltalk.addMethod(
 "_on_",
 smalltalk.method({
 selector: "on:",
-fn: function (anEnvironment){
-var self=this;
-var $2,$3,$1;
-$2=smalltalk.send(self,"_new",[]);
-smalltalk.send($2,"_environment_",[anEnvironment]);
-$3=smalltalk.send($2,"_yourself",[]);
-$1=$3;
-return $1;
+fn: function (anEnvironment) {
+    var self = this;
+    var $2, $3, $1;
+    $2 = smalltalk.send(self, "_new", []);
+    smalltalk.send($2, "_environment_", [anEnvironment]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 }
 }),
 smalltalk.HLBrowserModel.klass);
 
 
-smalltalk.addClass('HLBrowserSourceWidget', smalltalk.HLWidget, ['model', 'sourceArea'], 'Helios-Browser');
+smalltalk.addClass('HLBrowserSourceWidget', smalltalk.HLWidget, ['model', 'codeWidget'], 'Helios-Browser');
 smalltalk.addMethod(
-"_classSelected_",
+"_codeWidget",
 smalltalk.method({
-selector: "classSelected:",
-fn: function (aClass) {
+selector: "codeWidget",
+fn: function () {
     var self = this;
     var $1;
-    if (($receiver = aClass) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_contents_", [""]);
-        return $1;
+    if (($receiver = self['@codeWidget']) == nil || $receiver == undefined) {
+        self['@codeWidget'] = smalltalk.send(smalltalk.HLCodeWidget || HLCodeWidget, "_new", []);
+        $1 = self['@codeWidget'];
     } else {
+        $1 = self['@codeWidget'];
     }
-    smalltalk.send(self, "_contents_", [smalltalk.send(aClass, "_definition", [])]);
-    return self;
+    return $1;
 }
 }),
 smalltalk.HLBrowserSourceWidget);
@@ -1310,25 +1354,7 @@ smalltalk.method({
 selector: "contents:",
 fn: function (aString) {
     var self = this;
-    smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_contents_", [aString]);
-    return self;
-}
-}),
-smalltalk.HLBrowserSourceWidget);
-
-smalltalk.addMethod(
-"_methodSelected_",
-smalltalk.method({
-selector: "methodSelected:",
-fn: function (aCompiledMethod) {
-    var self = this;
-    var $1;
-    if (($receiver = aCompiledMethod) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_contents_", [""]);
-        return $1;
-    } else {
-    }
-    smalltalk.send(self, "_contents_", [smalltalk.send(aCompiledMethod, "_source", [])]);
+    smalltalk.send(smalltalk.send(self, "_codeWidget", []), "_contents_", [aString]);
     return self;
 }
 }),
@@ -1352,70 +1378,88 @@ selector: "model:",
 fn: function (aBrowserModel) {
     var self = this;
     self['@model'] = aBrowserModel;
-    smalltalk.send(self['@model'], "_subscribe_", [self]);
+    smalltalk.send(self, "_observeModel", []);
     return self;
 }
 }),
 smalltalk.HLBrowserSourceWidget);
 
 smalltalk.addMethod(
-"_protocolSelected_",
+"_observeModel",
 smalltalk.method({
-selector: "protocolSelected:",
-fn: function (aString) {
+selector: "observeModel",
+fn: function () {
     var self = this;
-    var $1, $2;
-    $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []);
-    if (($receiver = $1) == nil || $receiver == undefined) {
-        $2 = smalltalk.send(self, "_contents_", [""]);
-        return $2;
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLMethodSelected || HLMethodSelected, function (ann) {return smalltalk.send(self, "_onMethodSelected_", [smalltalk.send(ann, "_item", [])]);}]);
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLClassSelected || HLClassSelected, function (ann) {return smalltalk.send(self, "_onClassSelected_", [smalltalk.send(ann, "_item", [])]);}]);
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLProtocolSelected || HLProtocolSelected, function (ann) {return smalltalk.send(self, "_onProtocolSelected_", [smalltalk.send(ann, "_item", [])]);}]);
+    return self;
+}
+}),
+smalltalk.HLBrowserSourceWidget);
+
+smalltalk.addMethod(
+"_onClassSelected_",
+smalltalk.method({
+selector: "onClassSelected:",
+fn: function (aClass) {
+    var self = this;
+    var $1;
+    if (($receiver = aClass) == nil || $receiver == undefined) {
+        $1 = smalltalk.send(self, "_contents_", [""]);
+        return $1;
     } else {
     }
-    smalltalk.send(self, "_contents_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []), "_definition", [])]);
+    smalltalk.send(self, "_contents_", [smalltalk.send(aClass, "_definition", [])]);
     return self;
 }
 }),
 smalltalk.HLBrowserSourceWidget);
 
 smalltalk.addMethod(
-"_renderContentOn_",
+"_onMethodSelected_",
 smalltalk.method({
-selector: "renderContentOn:",
-fn: function (html) {
+selector: "onMethodSelected:",
+fn: function (aCompiledMethod) {
     var self = this;
-    smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_renderOn_", [html]);
+    var $1;
+    if (($receiver = aCompiledMethod) == nil || $receiver == undefined) {
+        $1 = smalltalk.send(self, "_contents_", [""]);
+        return $1;
+    } else {
+    }
+    smalltalk.send(self, "_contents_", [smalltalk.send(aCompiledMethod, "_source", [])]);
     return self;
 }
 }),
 smalltalk.HLBrowserSourceWidget);
 
 smalltalk.addMethod(
-"_sourceArea",
+"_onProtocolSelected_",
 smalltalk.method({
-selector: "sourceArea",
-fn: function () {
+selector: "onProtocolSelected:",
+fn: function (aString) {
     var self = this;
-    var $1;
-    if (($receiver = self['@sourceArea']) == nil || $receiver == undefined) {
-        self['@sourceArea'] = smalltalk.send(smalltalk.HLSourceArea || HLSourceArea, "_new", []);
-        $1 = self['@sourceArea'];
+    var $1, $2;
+    $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []);
+    if (($receiver = $1) == nil || $receiver == undefined) {
+        $2 = smalltalk.send(self, "_contents_", [""]);
+        return $2;
     } else {
-        $1 = self['@sourceArea'];
     }
-    return $1;
+    smalltalk.send(self, "_contents_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []), "_definition", [])]);
+    return self;
 }
 }),
 smalltalk.HLBrowserSourceWidget);
 
 smalltalk.addMethod(
-"_subscribeTo_",
+"_renderContentOn_",
 smalltalk.method({
-selector: "subscribeTo:",
-fn: function (anAnnouncer) {
+selector: "renderContentOn:",
+fn: function (html) {
     var self = this;
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLMethodSelected || HLMethodSelected, function (ann) {return smalltalk.send(self, "_methodSelected_", [smalltalk.send(ann, "_item", [])]);}]);
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLClassSelected || HLClassSelected, function (ann) {return smalltalk.send(self, "_classSelected_", [smalltalk.send(ann, "_item", [])]);}]);
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLProtocolSelected || HLProtocolSelected, function (ann) {return smalltalk.send(self, "_protocolSelected_", [smalltalk.send(ann, "_item", [])]);}]);
+    smalltalk.send(smalltalk.send(self, "_codeWidget", []), "_renderOn_", [html]);
     return self;
 }
 }),

+ 427 - 368
js/Helios-Browser.js

@@ -337,12 +337,28 @@ category: 'accessing',
 fn: function (aBrowserModel) {
     var self = this;
     self['@model'] = aBrowserModel;
-    smalltalk.send(self['@model'], "_subscribe_", [self]);
+    smalltalk.send(self, "_observeModel", []);
     return self;
 },
 args: ["aBrowserModel"],
-source: "model: aBrowserModel\x0a\x09\x22TODO: unsubscribe from previous model\x22\x0a    \x0a\x09model := aBrowserModel.\x0a    model subscribe: self",
-messageSends: ["subscribe:"],
+source: "model: aBrowserModel\x0a\x09model := aBrowserModel.\x0a    \x0a    self observeModel",
+messageSends: ["observeModel"],
+referencedClasses: []
+}),
+smalltalk.HLBrowserListWidget);
+
+smalltalk.addMethod(
+"_observeModel",
+smalltalk.method({
+selector: "observeModel",
+category: 'actions',
+fn: function () {
+    var self = this;
+    return self;
+},
+args: [],
+source: "observeModel",
+messageSends: [],
 referencedClasses: []
 }),
 smalltalk.HLBrowserListWidget);
@@ -465,10 +481,48 @@ referencedClasses: []
 smalltalk.HLClassesListWidget);
 
 smalltalk.addMethod(
-"_packageSelected_",
+"_observeModel",
 smalltalk.method({
-selector: "packageSelected:",
+selector: "observeModel",
 category: 'actions',
+fn: function () {
+    var self = this;
+    var $1, $2;
+    $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []);
+    smalltalk.send($1, "_on_do_", [smalltalk.HLPackageSelected || HLPackageSelected, function (ann) {return smalltalk.send(self, "_onPackageSelected_", [smalltalk.send(ann, "_item", [])]);}]);
+    smalltalk.send($1, "_on_do_", [smalltalk.HLShowInstanceToggled || HLShowInstanceToggled, function (ann) {return smalltalk.send(self, "_onShowInstanceToggled", []);}]);
+    $2 = smalltalk.send($1, "_on_do_", [smalltalk.HLClassSelected || HLClassSelected, function (ann) {return smalltalk.send(self, "_onClassSelected_", [smalltalk.send(ann, "_item", [])]);}]);
+    return self;
+},
+args: [],
+source: "observeModel\x0a\x09self model announcer \x0a    \x09on: HLPackageSelected do: [ :ann | self onPackageSelected: ann item ];\x0a    \x09on: HLShowInstanceToggled do: [ :ann | self onShowInstanceToggled ];\x0a\x09\x09on: HLClassSelected do: [ :ann | self onClassSelected: ann item ]",
+messageSends: ["on:do:", "onPackageSelected:", "item", "announcer", "model", "onShowInstanceToggled", "onClassSelected:"],
+referencedClasses: ["HLPackageSelected", "HLShowInstanceToggled", "HLClassSelected"]
+}),
+smalltalk.HLClassesListWidget);
+
+smalltalk.addMethod(
+"_onClassSelected_",
+smalltalk.method({
+selector: "onClassSelected:",
+category: 'reactions',
+fn: function (aClass) {
+    var self = this;
+    smalltalk.send(self, "_focus", []);
+    return self;
+},
+args: ["aClass"],
+source: "onClassSelected: aClass\x0a\x09self focus",
+messageSends: ["focus"],
+referencedClasses: []
+}),
+smalltalk.HLClassesListWidget);
+
+smalltalk.addMethod(
+"_onPackageSelected_",
+smalltalk.method({
+selector: "onPackageSelected:",
+category: 'reactions',
 fn: function (aPackage) {
     var self = this;
     var $1;
@@ -483,12 +537,29 @@ fn: function (aPackage) {
     return self;
 },
 args: ["aPackage"],
-source: "packageSelected: aPackage\x0a    self selectedItem: nil.\x0a    \x0a    self items: (aPackage \x0a    \x09ifNil: [ #() ]\x0a  \x09\x09ifNotNil: [ (aPackage classes \x0a        \x09collect: [ :each | each theNonMetaClass ]) asSet asArray ]).\x0a\x0a    self refresh",
+source: "onPackageSelected: aPackage\x0a    self selectedItem: nil.\x0a    \x0a    self items: (aPackage \x0a    \x09ifNil: [ #() ]\x0a  \x09\x09ifNotNil: [ (aPackage classes \x0a        \x09collect: [ :each | each theNonMetaClass ]) asSet asArray ]).\x0a\x0a    self refresh",
 messageSends: ["selectedItem:", "items:", "ifNil:ifNotNil:", "asArray", "asSet", "collect:", "theNonMetaClass", "classes", "refresh"],
 referencedClasses: []
 }),
 smalltalk.HLClassesListWidget);
 
+smalltalk.addMethod(
+"_onShowInstanceToggled",
+smalltalk.method({
+selector: "onShowInstanceToggled",
+category: 'reactions',
+fn: function () {
+    var self = this;
+    smalltalk.send(self, "_refresh", []);
+    return self;
+},
+args: [],
+source: "onShowInstanceToggled\x0a\x09self refresh",
+messageSends: ["refresh"],
+referencedClasses: []
+}),
+smalltalk.HLClassesListWidget);
+
 smalltalk.addMethod(
 "_renderButtonsOn_",
 smalltalk.method({
@@ -611,11 +682,12 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "selectItem:",
 category: 'actions',
-fn: function (aClass){
-var self=this;
-smalltalk.send(self,"_selectItem_",[aClass],smalltalk.HLBrowserListWidget);
-smalltalk.send(smalltalk.send(self,"_model",[]),"_selectedClass_",[aClass]);
-return self},
+fn: function (aClass) {
+    var self = this;
+    smalltalk.send(self, "_selectItem_", [aClass], smalltalk.HLBrowserListWidget);
+    smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass_", [aClass]);
+    return self;
+},
 args: ["aClass"],
 source: "selectItem: aClass\x0a\x09super selectItem: aClass.\x0a    self model selectedClass: aClass",
 messageSends: ["selectItem:", "selectedClass:", "model"],
@@ -658,25 +730,6 @@ referencedClasses: []
 }),
 smalltalk.HLClassesListWidget);
 
-smalltalk.addMethod(
-"_subscribeTo_",
-smalltalk.method({
-selector: "subscribeTo:",
-category: 'announcements',
-fn: function (anAnnouncer) {
-    var self = this;
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLPackageSelected || HLPackageSelected, function (ann) {return smalltalk.send(self, "_packageSelected_", [smalltalk.send(ann, "_item", [])]);}]);
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLShowInstanceToggled || HLShowInstanceToggled, function (ann) {return smalltalk.send(self, "_refresh", []);}]);
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLClassSelected || HLClassSelected, function (ann) {return smalltalk.send(self, "_focus", []);}]);
-    return self;
-},
-args: ["anAnnouncer"],
-source: "subscribeTo: anAnnouncer\x0a\x09anAnnouncer on: HLPackageSelected do: [ :ann |\x0a    \x09self packageSelected: ann item ].\x0a    anAnnouncer on: HLShowInstanceToggled do: [ :ann |\x0a    \x09self refresh ].\x0a    anAnnouncer on: HLClassSelected do: [ :ann |\x0a    \x09self focus ]",
-messageSends: ["on:do:", "packageSelected:", "item", "refresh", "focus"],
-referencedClasses: ["HLPackageSelected", "HLShowInstanceToggled", "HLClassSelected"]
-}),
-smalltalk.HLClassesListWidget);
-
 
 
 smalltalk.addClass('HLMethodsListWidget', smalltalk.HLBrowserListWidget, ['selectorsCache'], 'Helios-Browser');
@@ -826,6 +879,72 @@ referencedClasses: []
 }),
 smalltalk.HLMethodsListWidget);
 
+smalltalk.addMethod(
+"_observeModel",
+smalltalk.method({
+selector: "observeModel",
+category: 'actions',
+fn: function () {
+    var self = this;
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLProtocolSelected || HLProtocolSelected, function (ann) {return smalltalk.send(self, "_onProtocolSelected_", [smalltalk.send(ann, "_item", [])]);}]);
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLShowInstanceToggled || HLShowInstanceToggled, function (ann) {return smalltalk.send(self, "_onProtocolSelected_", [nil]);}]);
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLMethodSelected || HLMethodSelected, function (ann) {return smalltalk.send(self, "_onMethodSelected_", [smalltalk.send(ann, "_item", [])]);}]);
+    return self;
+},
+args: [],
+source: "observeModel\x0a\x09self model announcer on: HLProtocolSelected do: [ :ann |\x0a    \x09self onProtocolSelected: ann item ].\x0a    self model announcer on: HLShowInstanceToggled do: [ :ann |\x0a    \x09self onProtocolSelected: nil ].\x0a    self model announcer on: HLMethodSelected do: [ :ann |\x0a    \x09self onMethodSelected: ann item ]",
+messageSends: ["on:do:", "onProtocolSelected:", "item", "announcer", "model", "onMethodSelected:"],
+referencedClasses: ["HLProtocolSelected", "HLShowInstanceToggled", "HLMethodSelected"]
+}),
+smalltalk.HLMethodsListWidget);
+
+smalltalk.addMethod(
+"_onMethodSelected_",
+smalltalk.method({
+selector: "onMethodSelected:",
+category: 'reactions',
+fn: function (aMethod) {
+    var self = this;
+    smalltalk.send(self, "_focus", []);
+    return self;
+},
+args: ["aMethod"],
+source: "onMethodSelected: aMethod\x0a\x09self focus",
+messageSends: ["focus"],
+referencedClasses: []
+}),
+smalltalk.HLMethodsListWidget);
+
+smalltalk.addMethod(
+"_onProtocolSelected_",
+smalltalk.method({
+selector: "onProtocolSelected:",
+category: 'reactions',
+fn: function (aString) {
+    var self = this;
+    var $2, $1;
+    smalltalk.send(self, "_selectedItem_", [nil]);
+    $2 = smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []);
+    if (($receiver = $2) == nil || $receiver == undefined) {
+        $1 = [];
+    } else {
+        if (($receiver = aString) == nil || $receiver == undefined) {
+            $1 = [];
+        } else {
+            $1 = smalltalk.send(self, "_methodsInProtocol_", [aString]);
+        }
+    }
+    smalltalk.send(self, "_items_", [$1]);
+    smalltalk.send(self, "_refresh", []);
+    return self;
+},
+args: ["aString"],
+source: "onProtocolSelected: aString\x0a    self selectedItem: nil.\x0a    \x0a    self items: (self model selectedClass \x0a    \x09ifNil: [ #() ]\x0a      \x09ifNotNil: [ aString\x0a    \x09\x09ifNil: [ #() ]\x0a      \x09\x09ifNotNil: [ self methodsInProtocol: aString ] ]).\x0a        \x0a    self refresh",
+messageSends: ["selectedItem:", "items:", "ifNil:ifNotNil:", "methodsInProtocol:", "selectedClass", "model", "refresh"],
+referencedClasses: []
+}),
+smalltalk.HLMethodsListWidget);
+
 smalltalk.addMethod(
 "_overrideSelectors",
 smalltalk.method({
@@ -862,35 +981,6 @@ referencedClasses: ["Set"]
 }),
 smalltalk.HLMethodsListWidget);
 
-smalltalk.addMethod(
-"_protocolSelected_",
-smalltalk.method({
-selector: "protocolSelected:",
-category: 'actions',
-fn: function (aString){
-var self=this;
-var $2,$1;
-smalltalk.send(self,"_selectedItem_",[nil]);
-$2=smalltalk.send(smalltalk.send(self,"_model",[]),"_selectedClass",[]);
-if(($receiver = $2) == nil || $receiver == undefined){
-$1=[];
-} else {
-if(($receiver = aString) == nil || $receiver == undefined){
-$1=[];
-} else {
-$1=smalltalk.send(self,"_methodsInProtocol_",[aString]);
-};
-};
-smalltalk.send(self,"_items_",[$1]);
-smalltalk.send(self,"_refresh",[]);
-return self},
-args: ["aString"],
-source: "protocolSelected: aString\x0a    self selectedItem: nil.\x0a    \x0a    self items: (self model selectedClass \x0a    \x09ifNil: [ #() ]\x0a      \x09ifNotNil: [ aString\x0a    \x09\x09ifNil: [ #() ]\x0a      \x09\x09ifNotNil: [ self methodsInProtocol: aString ] ]).\x0a        \x0a    self refresh",
-messageSends: ["selectedItem:", "items:", "ifNil:ifNotNil:", "methodsInProtocol:", "selectedClass", "model", "refresh"],
-referencedClasses: []
-}),
-smalltalk.HLMethodsListWidget);
-
 smalltalk.addMethod(
 "_renderContentOn_",
 smalltalk.method({
@@ -939,11 +1029,12 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "selectItem:",
 category: 'actions',
-fn: function (aCompiledMethod){
-var self=this;
-smalltalk.send(self,"_selectItem_",[aCompiledMethod],smalltalk.HLBrowserListWidget);
-smalltalk.send(smalltalk.send(self,"_model",[]),"_selectedMethod_",[aCompiledMethod]);
-return self},
+fn: function (aCompiledMethod) {
+    var self = this;
+    smalltalk.send(self, "_selectItem_", [aCompiledMethod], smalltalk.HLBrowserListWidget);
+    smalltalk.send(smalltalk.send(self, "_model", []), "_selectedMethod_", [aCompiledMethod]);
+    return self;
+},
 args: ["aCompiledMethod"],
 source: "selectItem: aCompiledMethod\x0a\x09super selectItem: aCompiledMethod.\x0a   \x09self model selectedMethod: aCompiledMethod",
 messageSends: ["selectItem:", "selectedMethod:", "model"],
@@ -967,25 +1058,6 @@ referencedClasses: []
 }),
 smalltalk.HLMethodsListWidget);
 
-smalltalk.addMethod(
-"_subscribeTo_",
-smalltalk.method({
-selector: "subscribeTo:",
-category: 'announcements',
-fn: function (anAnnouncer) {
-    var self = this;
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLProtocolSelected || HLProtocolSelected, function (ann) {return smalltalk.send(self, "_protocolSelected_", [smalltalk.send(ann, "_item", [])]);}]);
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLShowInstanceToggled || HLShowInstanceToggled, function (ann) {return smalltalk.send(self, "_protocolSelected_", [nil]);}]);
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLMethodSelected || HLMethodSelected, function (ann) {return smalltalk.send(self, "_focus", []);}]);
-    return self;
-},
-args: ["anAnnouncer"],
-source: "subscribeTo: anAnnouncer\x0a\x09anAnnouncer on: HLProtocolSelected do: [ :ann |\x0a    \x09self protocolSelected: ann item ].\x0a    anAnnouncer on: HLShowInstanceToggled do: [ :ann |\x0a    \x09self protocolSelected: nil ].\x0a    anAnnouncer on: HLMethodSelected do: [ :ann |\x0a    \x09self focus ]",
-messageSends: ["on:do:", "protocolSelected:", "item", "focus"],
-referencedClasses: ["HLProtocolSelected", "HLShowInstanceToggled", "HLMethodSelected"]
-}),
-smalltalk.HLMethodsListWidget);
-
 
 
 smalltalk.addClass('HLPackagesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
@@ -1011,14 +1083,12 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "initializeItems",
 category: 'accessing',
-fn: function (){
-var self=this;
-var $1;
-self["@items"]=smalltalk.send(smalltalk.send(smalltalk.send(self,"_model",[]),"_packages",[]),"_sort_",[(function(a,b){
-return smalltalk.send(smalltalk.send(a,"_name",[]),"__lt",[smalltalk.send(b,"_name",[])]);
-})]);
-$1=self["@items"];
-return $1;
+fn: function () {
+    var self = this;
+    var $1;
+    self['@items'] = smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_packages", []), "_sort_", [function (a, b) {return smalltalk.send(smalltalk.send(a, "_name", []), "__lt", [smalltalk.send(b, "_name", [])]);}]);
+    $1 = self['@items'];
+    return $1;
 },
 args: [],
 source: "initializeItems\x0a\x09^ items := self model packages sort:[:a :b|\x0a\x09\x09\x09\x09\x09\x09a name < b name]",
@@ -1032,15 +1102,15 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "items",
 category: 'accessing',
-fn: function (){
-var self=this;
-var $1;
-if(($receiver = self["@items"]) == nil || $receiver == undefined){
-$1=smalltalk.send(self,"_initializeItems",[]);
-} else {
-$1=self["@items"];
-};
-return $1;
+fn: function () {
+    var self = this;
+    var $1;
+    if (($receiver = self['@items']) == nil || $receiver == undefined) {
+        $1 = smalltalk.send(self, "_initializeItems", []);
+    } else {
+        $1 = self['@items'];
+    }
+    return $1;
 },
 args: [],
 source: "items\x0a\x09^ items ifNil: [self initializeItems]",
@@ -1049,6 +1119,40 @@ referencedClasses: []
 }),
 smalltalk.HLPackagesListWidget);
 
+smalltalk.addMethod(
+"_observeModel",
+smalltalk.method({
+selector: "observeModel",
+category: 'actions',
+fn: function () {
+    var self = this;
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLPackageSelected || HLPackageSelected, function (ann) {return smalltalk.send(self, "_onPackageSelected_", [smalltalk.send(ann, "_item", [])]);}]);
+    return self;
+},
+args: [],
+source: "observeModel\x0a    self model announcer on: HLPackageSelected do: [ :ann |\x0a    \x09self onPackageSelected: ann item ]",
+messageSends: ["on:do:", "onPackageSelected:", "item", "announcer", "model"],
+referencedClasses: ["HLPackageSelected"]
+}),
+smalltalk.HLPackagesListWidget);
+
+smalltalk.addMethod(
+"_onPackageSelected_",
+smalltalk.method({
+selector: "onPackageSelected:",
+category: 'reactions',
+fn: function (aPackage) {
+    var self = this;
+    smalltalk.send(self, "_focus", []);
+    return self;
+},
+args: ["aPackage"],
+source: "onPackageSelected: aPackage\x0a\x09self focus",
+messageSends: ["focus"],
+referencedClasses: []
+}),
+smalltalk.HLPackagesListWidget);
+
 smalltalk.addMethod(
 "_renderButtonsOn_",
 smalltalk.method({
@@ -1081,11 +1185,12 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "selectItem:",
 category: 'actions',
-fn: function (aPackage){
-var self=this;
-smalltalk.send(self,"_selectItem_",[aPackage],smalltalk.HLBrowserListWidget);
-smalltalk.send(smalltalk.send(self,"_model",[]),"_selectedPackage_",[aPackage]);
-return self},
+fn: function (aPackage) {
+    var self = this;
+    smalltalk.send(self, "_selectItem_", [aPackage], smalltalk.HLBrowserListWidget);
+    smalltalk.send(smalltalk.send(self, "_model", []), "_selectedPackage_", [aPackage]);
+    return self;
+},
 args: ["aPackage"],
 source: "selectItem: aPackage\x0a\x09super selectItem: aPackage.\x0a    self model selectedPackage: aPackage",
 messageSends: ["selectItem:", "selectedPackage:", "model"],
@@ -1093,23 +1198,6 @@ referencedClasses: []
 }),
 smalltalk.HLPackagesListWidget);
 
-smalltalk.addMethod(
-"_subscribeTo_",
-smalltalk.method({
-selector: "subscribeTo:",
-category: 'announcements',
-fn: function (anAnnouncer) {
-    var self = this;
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLPackageSelected || HLPackageSelected, function (ann) {return smalltalk.send(self, "_focus", []);}]);
-    return self;
-},
-args: ["anAnnouncer"],
-source: "subscribeTo: anAnnouncer\x0a    anAnnouncer on: HLPackageSelected do: [ :ann |\x0a    \x09self focus ]",
-messageSends: ["on:do:", "focus"],
-referencedClasses: ["HLPackageSelected"]
-}),
-smalltalk.HLPackagesListWidget);
-
 
 
 smalltalk.addClass('HLProtocolsListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
@@ -1132,10 +1220,29 @@ referencedClasses: []
 smalltalk.HLProtocolsListWidget);
 
 smalltalk.addMethod(
-"_classSelected_",
+"_observeModel",
 smalltalk.method({
-selector: "classSelected:",
+selector: "observeModel",
 category: 'actions',
+fn: function () {
+    var self = this;
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLClassSelected || HLClassSelected, function (ann) {return smalltalk.send(self, "_onClassSelected_", [smalltalk.send(ann, "_item", [])]);}]);
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLShowInstanceToggled || HLShowInstanceToggled, function (ann) {return smalltalk.send(self, "_onClassSelected_", [smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", [])]);}]);
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLProtocolSelected || HLProtocolSelected, function (ann) {return smalltalk.send(self, "_onProtocolSelected_", [smalltalk.send(ann, "_item", [])]);}]);
+    return self;
+},
+args: [],
+source: "observeModel\x0a\x09self model announcer on: HLClassSelected do: [ :ann |\x0a    \x09self onClassSelected: ann item ].\x0a    self model announcer on: HLShowInstanceToggled do: [ :ann |\x0a    \x09self onClassSelected: self model selectedClass ].\x0a    self model announcer on: HLProtocolSelected do: [ :ann |\x0a    \x09self onProtocolSelected: ann item ]",
+messageSends: ["on:do:", "onClassSelected:", "item", "announcer", "model", "selectedClass", "onProtocolSelected:"],
+referencedClasses: ["HLClassSelected", "HLShowInstanceToggled", "HLProtocolSelected"]
+}),
+smalltalk.HLProtocolsListWidget);
+
+smalltalk.addMethod(
+"_onClassSelected_",
+smalltalk.method({
+selector: "onClassSelected:",
+category: 'reactions',
 fn: function (aClass) {
     var self = this;
     var $2, $3, $1;
@@ -1153,12 +1260,29 @@ fn: function (aClass) {
     return self;
 },
 args: ["aClass"],
-source: "classSelected: aClass\x0a    self selectedItem: nil.\x0a    \x0a    self items: (aClass\x0a    \x09ifNil: [ Array with: self allProtocol ]\x0a      \x09ifNotNil: [ \x0a        \x09(Array with: self allProtocol) \x0a            \x09addAll: aClass protocols; \x0a                yourself ]).\x0a\x0a    self refresh",
+source: "onClassSelected: aClass\x0a    self selectedItem: nil.\x0a    \x0a    self items: (aClass\x0a    \x09ifNil: [ Array with: self allProtocol ]\x0a      \x09ifNotNil: [ \x0a        \x09(Array with: self allProtocol) \x0a            \x09addAll: aClass protocols; \x0a                yourself ]).\x0a\x0a    self refresh",
 messageSends: ["selectedItem:", "items:", "ifNil:ifNotNil:", "with:", "allProtocol", "addAll:", "protocols", "yourself", "refresh"],
 referencedClasses: ["Array"]
 }),
 smalltalk.HLProtocolsListWidget);
 
+smalltalk.addMethod(
+"_onProtocolSelected_",
+smalltalk.method({
+selector: "onProtocolSelected:",
+category: 'reactions',
+fn: function (aString) {
+    var self = this;
+    smalltalk.send(self, "_focus", []);
+    return self;
+},
+args: ["aString"],
+source: "onProtocolSelected: aString\x0a\x09self focus",
+messageSends: ["focus"],
+referencedClasses: []
+}),
+smalltalk.HLProtocolsListWidget);
+
 smalltalk.addMethod(
 "_renderContentOn_",
 smalltalk.method({
@@ -1189,11 +1313,12 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "selectItem:",
 category: 'actions',
-fn: function (aString){
-var self=this;
-smalltalk.send(self,"_selectItem_",[aString],smalltalk.HLBrowserListWidget);
-smalltalk.send(smalltalk.send(self,"_model",[]),"_selectedProtocol_",[aString]);
-return self},
+fn: function (aString) {
+    var self = this;
+    smalltalk.send(self, "_selectItem_", [aString], smalltalk.HLBrowserListWidget);
+    smalltalk.send(smalltalk.send(self, "_model", []), "_selectedProtocol_", [aString]);
+    return self;
+},
 args: ["aString"],
 source: "selectItem: aString\x0a\x09super selectItem: aString.\x0a    self model selectedProtocol: aString",
 messageSends: ["selectItem:", "selectedProtocol:", "model"],
@@ -1206,11 +1331,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "selectedItem",
 category: 'accessing',
-fn: function (){
-var self=this;
-var $1;
-$1=smalltalk.send(self,"_selectedItem",[],smalltalk.HLBrowserListWidget);
-return $1;
+fn: function () {
+    var self = this;
+    var $1;
+    $1 = smalltalk.send(self, "_selectedItem", [], smalltalk.HLBrowserListWidget);
+    return $1;
 },
 args: [],
 source: "selectedItem\x0a\x09^ super selectedItem\x22 ifNil: [ self allProtocol ]\x22",
@@ -1219,25 +1344,6 @@ referencedClasses: []
 }),
 smalltalk.HLProtocolsListWidget);
 
-smalltalk.addMethod(
-"_subscribeTo_",
-smalltalk.method({
-selector: "subscribeTo:",
-category: 'announcements',
-fn: function (anAnnouncer) {
-    var self = this;
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLClassSelected || HLClassSelected, function (ann) {return smalltalk.send(self, "_classSelected_", [smalltalk.send(ann, "_item", [])]);}]);
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLShowInstanceToggled || HLShowInstanceToggled, function (ann) {return smalltalk.send(self, "_classSelected_", [smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", [])]);}]);
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLProtocolSelected || HLProtocolSelected, function (ann) {return smalltalk.send(self, "_focus", []);}]);
-    return self;
-},
-args: ["anAnnouncer"],
-source: "subscribeTo: anAnnouncer\x0a\x09anAnnouncer on: HLClassSelected do: [ :ann |\x0a    \x09self classSelected: ann item ].\x0a    anAnnouncer on: HLShowInstanceToggled do: [ :ann |\x0a    \x09self classSelected: self model selectedClass ].\x0a    anAnnouncer on: HLProtocolSelected do: [ :ann |\x0a    \x09self focus ]",
-messageSends: ["on:do:", "classSelected:", "item", "selectedClass", "model", "focus"],
-referencedClasses: ["HLClassSelected", "HLShowInstanceToggled", "HLProtocolSelected"]
-}),
-smalltalk.HLProtocolsListWidget);
-
 
 
 smalltalk.addClass('HLBrowserModel', smalltalk.Object, ['announcer', 'environment', 'selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedMethod', 'showInstance', 'showComment'], 'Helios-Browser');
@@ -1280,56 +1386,25 @@ referencedClasses: ["Announcer"]
 }),
 smalltalk.HLBrowserModel);
 
-smalltalk.addMethod(
-"_beLocal",
-smalltalk.method({
-selector: "beLocal",
-category: 'actions',
-fn: function (){
-var self=this;
-smalltalk.send(self,"_initializeEnvironment",[]);
-return self},
-args: [],
-source: "beLocal\x0a\x0a\x09self initializeEnvironment\x0a",
-messageSends: ["initializeEnvironment"],
-referencedClasses: []
-}),
-smalltalk.HLBrowserModel);
-
-smalltalk.addMethod(
-"_beRemoteOn_port_",
-smalltalk.method({
-selector: "beRemoteOn:port:",
-category: 'actions',
-fn: function (anIPAddress,aPort){
-var self=this;
-return self},
-args: ["anIPAddress", "aPort"],
-source: "beRemoteOn: anIPAddress port: aPort\x0a\x0a\x09\x22to-do\x22\x0a    \x0a    \x22environment := HLRemoteEnvironment on: anIPAddress port: aPort\x0a    \x0a    ...kind of stuff\x22\x0a    \x0a",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLBrowserModel);
-
 smalltalk.addMethod(
 "_environment",
 smalltalk.method({
 selector: "environment",
 category: 'accessing',
-fn: function (){
-var self=this;
-var $1;
-if(($receiver = self["@environment"]) == nil || $receiver == undefined){
-$1=smalltalk.send(self,"_initializeEnvironment",[]);
-} else {
-$1=self["@environment"];
-};
-return $1;
+fn: function () {
+    var self = this;
+    var $1;
+    if (($receiver = self['@environment']) == nil || $receiver == undefined) {
+        $1 = smalltalk.send(smalltalk.send(smalltalk.HLManager || HLManager, "_current", []), "_environment", []);
+    } else {
+        $1 = self['@environment'];
+    }
+    return $1;
 },
 args: [],
-source: "environment\x0a\x09^ environment ifNil: [ self initializeEnvironment ]",
-messageSends: ["ifNil:", "initializeEnvironment"],
-referencedClasses: []
+source: "environment\x0a\x09^ environment ifNil: [ HLManager current environment ]",
+messageSends: ["ifNil:", "environment", "current"],
+referencedClasses: ["HLManager"]
 }),
 smalltalk.HLBrowserModel);
 
@@ -1350,25 +1425,6 @@ referencedClasses: []
 }),
 smalltalk.HLBrowserModel);
 
-smalltalk.addMethod(
-"_initializeEnvironment",
-smalltalk.method({
-selector: "initializeEnvironment",
-category: 'initialization',
-fn: function (){
-var self=this;
-var $1;
-self["@environment"]=smalltalk.send((smalltalk.HLLocalEnvironment || HLLocalEnvironment),"_new",[]);
-$1=self["@environment"];
-return $1;
-},
-args: [],
-source: "initializeEnvironment\x0a\x09^ environment := HLLocalEnvironment new",
-messageSends: ["new"],
-referencedClasses: ["HLLocalEnvironment"]
-}),
-smalltalk.HLBrowserModel);
-
 smalltalk.addMethod(
 "_packages",
 smalltalk.method({
@@ -1408,30 +1464,30 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "selectedClass:",
 category: 'accessing',
-fn: function (aClass){
-var self=this;
-var $1,$2,$3;
-$1=smalltalk.send(self["@selectedClass"],"__eq",[aClass]);
-if(! smalltalk.assert($1)){
-if(($receiver = aClass) == nil || $receiver == undefined){
-self["@selectedClass"]=nil;
-self["@selectedClass"];
-} else {
-$2=smalltalk.send(self,"_showInstance",[]);
-if(smalltalk.assert($2)){
-self["@selectedClass"]=smalltalk.send(aClass,"_theNonMetaClass",[]);
-self["@selectedClass"];
-} else {
-self["@selectedClass"]=smalltalk.send(aClass,"_theMetaClass",[]);
-self["@selectedClass"];
-};
-};
-smalltalk.send(self,"_selectedMethod_",[nil]);
-$3=smalltalk.send(self,"_selectedProtocol_",[nil]);
-$3;
-};
-smalltalk.send(smalltalk.send(self,"_announcer",[]),"_announce_",[smalltalk.send((smalltalk.HLClassSelected || HLClassSelected),"_on_",[smalltalk.send(self,"_selectedClass",[])])]);
-return self},
+fn: function (aClass) {
+    var self = this;
+    var $1, $2, $3;
+    $1 = smalltalk.send(self['@selectedClass'], "__eq", [aClass]);
+    if (!smalltalk.assert($1)) {
+        if (($receiver = aClass) == nil || $receiver == undefined) {
+            self['@selectedClass'] = nil;
+            self['@selectedClass'];
+        } else {
+            $2 = smalltalk.send(self, "_showInstance", []);
+            if (smalltalk.assert($2)) {
+                self['@selectedClass'] = smalltalk.send(aClass, "_theNonMetaClass", []);
+                self['@selectedClass'];
+            } else {
+                self['@selectedClass'] = smalltalk.send(aClass, "_theMetaClass", []);
+                self['@selectedClass'];
+            }
+        }
+        smalltalk.send(self, "_selectedMethod_", [nil]);
+        $3 = smalltalk.send(self, "_selectedProtocol_", [nil]);
+    }
+    smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLClassSelected || HLClassSelected, "_on_", [smalltalk.send(self, "_selectedClass", [])])]);
+    return self;
+},
 args: ["aClass"],
 source: "selectedClass: aClass\x0a\x09selectedClass = aClass ifFalse: [\x0a\x09\x09aClass \x0a    \x09\x09ifNil: [ selectedClass := nil ]\x0a      \x09\x09ifNotNil: [\x0a\x09\x09\x09\x09self showInstance \x0a    \x09\x09\x09\x09ifTrue: [ selectedClass := aClass theNonMetaClass ]\x0a      \x09\x09\x09\x09ifFalse: [ selectedClass := aClass theMetaClass ] ].\x0a    \x0a   \x09\x09self \x0a    \x09\x09selectedMethod: nil;\x0a       \x09 \x09selectedProtocol: nil ].\x0a        \x0a   self announcer announce: (HLClassSelected on: self selectedClass)",
 messageSends: ["ifFalse:", "ifNil:ifNotNil:", "ifTrue:ifFalse:", "theNonMetaClass", "theMetaClass", "showInstance", "selectedMethod:", "selectedProtocol:", "=", "announce:", "on:", "selectedClass", "announcer"],
@@ -1460,16 +1516,17 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "selectedMethod:",
 category: 'accessing',
-fn: function (aCompiledMethod){
-var self=this;
-var $1;
-$1=smalltalk.send(self["@selectedMethod"],"__eq",[aCompiledMethod]);
-if(! smalltalk.assert($1)){
-self["@selectedMethod"]=aCompiledMethod;
-self["@selectedMethod"];
-};
-smalltalk.send(smalltalk.send(self,"_announcer",[]),"_announce_",[smalltalk.send((smalltalk.HLMethodSelected || HLMethodSelected),"_on_",[aCompiledMethod])]);
-return self},
+fn: function (aCompiledMethod) {
+    var self = this;
+    var $1;
+    $1 = smalltalk.send(self['@selectedMethod'], "__eq", [aCompiledMethod]);
+    if (!smalltalk.assert($1)) {
+        self['@selectedMethod'] = aCompiledMethod;
+        self['@selectedMethod'];
+    }
+    smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLMethodSelected || HLMethodSelected, "_on_", [aCompiledMethod])]);
+    return self;
+},
 args: ["aCompiledMethod"],
 source: "selectedMethod: aCompiledMethod\x0a\x09selectedMethod = aCompiledMethod ifFalse: [\x0a\x09\x09selectedMethod := aCompiledMethod ].\x0a    \x0a    self announcer announce: (HLMethodSelected on: aCompiledMethod)",
 messageSends: ["ifFalse:", "=", "announce:", "on:", "announcer"],
@@ -1498,17 +1555,18 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "selectedPackage:",
 category: 'accessing',
-fn: function (aPackage){
-var self=this;
-var $1;
-$1=smalltalk.send(self["@selectedPackage"],"__eq",[aPackage]);
-if(! smalltalk.assert($1)){
-self["@selectedPackage"]=aPackage;
-self["@selectedPackage"];
-smalltalk.send(self,"_selectedClass_",[nil]);
-};
-smalltalk.send(smalltalk.send(self,"_announcer",[]),"_announce_",[smalltalk.send((smalltalk.HLPackageSelected || HLPackageSelected),"_on_",[aPackage])]);
-return self},
+fn: function (aPackage) {
+    var self = this;
+    var $1;
+    $1 = smalltalk.send(self['@selectedPackage'], "__eq", [aPackage]);
+    if (!smalltalk.assert($1)) {
+        self['@selectedPackage'] = aPackage;
+        self['@selectedPackage'];
+        smalltalk.send(self, "_selectedClass_", [nil]);
+    }
+    smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLPackageSelected || HLPackageSelected, "_on_", [aPackage])]);
+    return self;
+},
 args: ["aPackage"],
 source: "selectedPackage: aPackage\x0a\x09selectedPackage = aPackage ifFalse: [\x0a\x09\x09selectedPackage := aPackage.\x0a    \x09self selectedClass: nil ].\x0a    \x0a    self announcer announce: (HLPackageSelected on: aPackage)",
 messageSends: ["ifFalse:", "selectedClass:", "=", "announce:", "on:", "announcer"],
@@ -1537,17 +1595,18 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "selectedProtocol:",
 category: 'accessing',
-fn: function (aString){
-var self=this;
-var $1;
-$1=smalltalk.send(self["@selectedProtocol"],"__eq",[aString]);
-if(! smalltalk.assert($1)){
-self["@selectedProtocol"]=aString;
-self["@selectedProtocol"];
-smalltalk.send(self,"_selectedMethod_",[nil]);
-};
-smalltalk.send(smalltalk.send(self,"_announcer",[]),"_announce_",[smalltalk.send((smalltalk.HLProtocolSelected || HLProtocolSelected),"_on_",[aString])]);
-return self},
+fn: function (aString) {
+    var self = this;
+    var $1;
+    $1 = smalltalk.send(self['@selectedProtocol'], "__eq", [aString]);
+    if (!smalltalk.assert($1)) {
+        self['@selectedProtocol'] = aString;
+        self['@selectedProtocol'];
+        smalltalk.send(self, "_selectedMethod_", [nil]);
+    }
+    smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLProtocolSelected || HLProtocolSelected, "_on_", [aString])]);
+    return self;
+},
 args: ["aString"],
 source: "selectedProtocol: aString\x0a\x09selectedProtocol = aString ifFalse: [\x0a      \x09selectedProtocol := aString.\x0a    \x09self selectedMethod: nil ].\x0a    \x0a    self announcer announce: (HLProtocolSelected on: aString)",
 messageSends: ["ifFalse:", "selectedMethod:", "=", "announce:", "on:", "announcer"],
@@ -1670,14 +1729,14 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "on:",
 category: 'actions',
-fn: function (anEnvironment){
-var self=this;
-var $2,$3,$1;
-$2=smalltalk.send(self,"_new",[]);
-smalltalk.send($2,"_environment_",[anEnvironment]);
-$3=smalltalk.send($2,"_yourself",[]);
-$1=$3;
-return $1;
+fn: function (anEnvironment) {
+    var self = this;
+    var $2, $3, $1;
+    $2 = smalltalk.send(self, "_new", []);
+    smalltalk.send($2, "_environment_", [anEnvironment]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 },
 args: ["anEnvironment"],
 source: "on: anEnvironment\x0a\x0a\x09^ self new\x0a    \x09environment: anEnvironment;\x0a        yourself",
@@ -1687,27 +1746,27 @@ referencedClasses: []
 smalltalk.HLBrowserModel.klass);
 
 
-smalltalk.addClass('HLBrowserSourceWidget', smalltalk.HLWidget, ['model', 'sourceArea'], 'Helios-Browser');
+smalltalk.addClass('HLBrowserSourceWidget', smalltalk.HLWidget, ['model', 'codeWidget'], 'Helios-Browser');
 smalltalk.addMethod(
-"_classSelected_",
+"_codeWidget",
 smalltalk.method({
-selector: "classSelected:",
-category: 'actions',
-fn: function (aClass) {
+selector: "codeWidget",
+category: 'accessing',
+fn: function () {
     var self = this;
     var $1;
-    if (($receiver = aClass) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_contents_", [""]);
-        return $1;
+    if (($receiver = self['@codeWidget']) == nil || $receiver == undefined) {
+        self['@codeWidget'] = smalltalk.send(smalltalk.HLCodeWidget || HLCodeWidget, "_new", []);
+        $1 = self['@codeWidget'];
     } else {
+        $1 = self['@codeWidget'];
     }
-    smalltalk.send(self, "_contents_", [smalltalk.send(aClass, "_definition", [])]);
-    return self;
+    return $1;
 },
-args: ["aClass"],
-source: "classSelected: aClass\x0a\x09aClass ifNil: [ ^ self contents: '' ].\x0a    \x0a    self contents: aClass definition",
-messageSends: ["ifNil:", "contents:", "definition"],
-referencedClasses: []
+args: [],
+source: "codeWidget\x0a\x09^ codeWidget ifNil: [ codeWidget := HLCodeWidget new ]",
+messageSends: ["ifNil:", "new"],
+referencedClasses: ["HLCodeWidget"]
 }),
 smalltalk.HLBrowserSourceWidget);
 
@@ -1736,35 +1795,12 @@ selector: "contents:",
 category: 'accessing',
 fn: function (aString) {
     var self = this;
-    smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_contents_", [aString]);
+    smalltalk.send(smalltalk.send(self, "_codeWidget", []), "_contents_", [aString]);
     return self;
 },
 args: ["aString"],
-source: "contents: aString\x0a\x09self sourceArea contents: aString",
-messageSends: ["contents:", "sourceArea"],
-referencedClasses: []
-}),
-smalltalk.HLBrowserSourceWidget);
-
-smalltalk.addMethod(
-"_methodSelected_",
-smalltalk.method({
-selector: "methodSelected:",
-category: 'actions',
-fn: function (aCompiledMethod) {
-    var self = this;
-    var $1;
-    if (($receiver = aCompiledMethod) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_contents_", [""]);
-        return $1;
-    } else {
-    }
-    smalltalk.send(self, "_contents_", [smalltalk.send(aCompiledMethod, "_source", [])]);
-    return self;
-},
-args: ["aCompiledMethod"],
-source: "methodSelected: aCompiledMethod\x0a\x09aCompiledMethod ifNil: [ ^ self contents: '' ].\x0a    \x0a    self contents: aCompiledMethod source",
-messageSends: ["ifNil:", "contents:", "source"],
+source: "contents: aString\x0a\x09self codeWidget contents: aString",
+messageSends: ["contents:", "codeWidget"],
 referencedClasses: []
 }),
 smalltalk.HLBrowserSourceWidget);
@@ -1793,96 +1829,119 @@ category: 'accessing',
 fn: function (aBrowserModel) {
     var self = this;
     self['@model'] = aBrowserModel;
-    smalltalk.send(self['@model'], "_subscribe_", [self]);
+    smalltalk.send(self, "_observeModel", []);
     return self;
 },
 args: ["aBrowserModel"],
-source: "model: aBrowserModel\x0a\x09\x22TODO: unsubscribe from previous model\x22\x0a    \x0a\x09model := aBrowserModel.\x0a    model subscribe: self",
-messageSends: ["subscribe:"],
+source: "model: aBrowserModel\x0a\x09model := aBrowserModel.\x0a    \x0a    self observeModel",
+messageSends: ["observeModel"],
 referencedClasses: []
 }),
 smalltalk.HLBrowserSourceWidget);
 
 smalltalk.addMethod(
-"_protocolSelected_",
+"_observeModel",
 smalltalk.method({
-selector: "protocolSelected:",
+selector: "observeModel",
 category: 'actions',
-fn: function (aString) {
+fn: function () {
     var self = this;
-    var $1, $2;
-    $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []);
-    if (($receiver = $1) == nil || $receiver == undefined) {
-        $2 = smalltalk.send(self, "_contents_", [""]);
-        return $2;
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLMethodSelected || HLMethodSelected, function (ann) {return smalltalk.send(self, "_onMethodSelected_", [smalltalk.send(ann, "_item", [])]);}]);
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLClassSelected || HLClassSelected, function (ann) {return smalltalk.send(self, "_onClassSelected_", [smalltalk.send(ann, "_item", [])]);}]);
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLProtocolSelected || HLProtocolSelected, function (ann) {return smalltalk.send(self, "_onProtocolSelected_", [smalltalk.send(ann, "_item", [])]);}]);
+    return self;
+},
+args: [],
+source: "observeModel\x0a\x09self model announcer on: HLMethodSelected do: [ :ann |\x0a    \x09self onMethodSelected: ann item ].\x0a    self model announcer on: HLClassSelected do: [ :ann |\x0a    \x09self onClassSelected: ann item ].\x0a    self model announcer on: HLProtocolSelected do: [ :ann |\x0a    \x09self onProtocolSelected: ann item ]",
+messageSends: ["on:do:", "onMethodSelected:", "item", "announcer", "model", "onClassSelected:", "onProtocolSelected:"],
+referencedClasses: ["HLMethodSelected", "HLClassSelected", "HLProtocolSelected"]
+}),
+smalltalk.HLBrowserSourceWidget);
+
+smalltalk.addMethod(
+"_onClassSelected_",
+smalltalk.method({
+selector: "onClassSelected:",
+category: 'reactions',
+fn: function (aClass) {
+    var self = this;
+    var $1;
+    if (($receiver = aClass) == nil || $receiver == undefined) {
+        $1 = smalltalk.send(self, "_contents_", [""]);
+        return $1;
     } else {
     }
-    smalltalk.send(self, "_contents_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []), "_definition", [])]);
+    smalltalk.send(self, "_contents_", [smalltalk.send(aClass, "_definition", [])]);
     return self;
 },
-args: ["aString"],
-source: "protocolSelected: aString\x0a\x09self model selectedClass ifNil: [ ^ self contents: '' ].\x0a    \x0a    self contents: self model selectedClass definition",
-messageSends: ["ifNil:", "contents:", "selectedClass", "model", "definition"],
+args: ["aClass"],
+source: "onClassSelected: aClass\x0a\x09aClass ifNil: [ ^ self contents: '' ].\x0a    \x0a    self contents: aClass definition",
+messageSends: ["ifNil:", "contents:", "definition"],
 referencedClasses: []
 }),
 smalltalk.HLBrowserSourceWidget);
 
 smalltalk.addMethod(
-"_renderContentOn_",
+"_onMethodSelected_",
 smalltalk.method({
-selector: "renderContentOn:",
-category: 'rendering',
-fn: function (html) {
+selector: "onMethodSelected:",
+category: 'reactions',
+fn: function (aCompiledMethod) {
     var self = this;
-    smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_renderOn_", [html]);
+    var $1;
+    if (($receiver = aCompiledMethod) == nil || $receiver == undefined) {
+        $1 = smalltalk.send(self, "_contents_", [""]);
+        return $1;
+    } else {
+    }
+    smalltalk.send(self, "_contents_", [smalltalk.send(aCompiledMethod, "_source", [])]);
     return self;
 },
-args: ["html"],
-source: "renderContentOn: html\x0a\x09self sourceArea renderOn: html",
-messageSends: ["renderOn:", "sourceArea"],
+args: ["aCompiledMethod"],
+source: "onMethodSelected: aCompiledMethod\x0a\x09aCompiledMethod ifNil: [ ^ self contents: '' ].\x0a    \x0a    self contents: aCompiledMethod source",
+messageSends: ["ifNil:", "contents:", "source"],
 referencedClasses: []
 }),
 smalltalk.HLBrowserSourceWidget);
 
 smalltalk.addMethod(
-"_sourceArea",
+"_onProtocolSelected_",
 smalltalk.method({
-selector: "sourceArea",
-category: 'accessing',
-fn: function () {
+selector: "onProtocolSelected:",
+category: 'reactions',
+fn: function (aString) {
     var self = this;
-    var $1;
-    if (($receiver = self['@sourceArea']) == nil || $receiver == undefined) {
-        self['@sourceArea'] = smalltalk.send(smalltalk.HLSourceArea || HLSourceArea, "_new", []);
-        $1 = self['@sourceArea'];
+    var $1, $2;
+    $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []);
+    if (($receiver = $1) == nil || $receiver == undefined) {
+        $2 = smalltalk.send(self, "_contents_", [""]);
+        return $2;
     } else {
-        $1 = self['@sourceArea'];
     }
-    return $1;
+    smalltalk.send(self, "_contents_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []), "_definition", [])]);
+    return self;
 },
-args: [],
-source: "sourceArea\x0a\x09^ sourceArea ifNil: [ sourceArea := HLSourceArea new ]",
-messageSends: ["ifNil:", "new"],
-referencedClasses: ["HLSourceArea"]
+args: ["aString"],
+source: "onProtocolSelected: aString\x0a\x09self model selectedClass ifNil: [ ^ self contents: '' ].\x0a    \x0a    self contents: self model selectedClass definition",
+messageSends: ["ifNil:", "contents:", "selectedClass", "model", "definition"],
+referencedClasses: []
 }),
 smalltalk.HLBrowserSourceWidget);
 
 smalltalk.addMethod(
-"_subscribeTo_",
+"_renderContentOn_",
 smalltalk.method({
-selector: "subscribeTo:",
-category: 'announcements',
-fn: function (anAnnouncer) {
+selector: "renderContentOn:",
+category: 'rendering',
+fn: function (html) {
     var self = this;
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLMethodSelected || HLMethodSelected, function (ann) {return smalltalk.send(self, "_methodSelected_", [smalltalk.send(ann, "_item", [])]);}]);
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLClassSelected || HLClassSelected, function (ann) {return smalltalk.send(self, "_classSelected_", [smalltalk.send(ann, "_item", [])]);}]);
-    smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLProtocolSelected || HLProtocolSelected, function (ann) {return smalltalk.send(self, "_protocolSelected_", [smalltalk.send(ann, "_item", [])]);}]);
+    smalltalk.send(smalltalk.send(self, "_codeWidget", []), "_renderOn_", [html]);
     return self;
 },
-args: ["anAnnouncer"],
-source: "subscribeTo: anAnnouncer\x0a\x09anAnnouncer on: HLMethodSelected do: [ :ann |\x0a    \x09self methodSelected: ann item ].\x0a    anAnnouncer on: HLClassSelected do: [ :ann |\x0a    \x09self classSelected: ann item ].\x0a    anAnnouncer on: HLProtocolSelected do: [ :ann |\x0a    \x09self protocolSelected: ann item ]",
-messageSends: ["on:do:", "methodSelected:", "item", "classSelected:", "protocolSelected:"],
-referencedClasses: ["HLMethodSelected", "HLClassSelected", "HLProtocolSelected"]
+args: ["html"],
+source: "renderContentOn: html\x0a\x09self codeWidget renderOn: html",
+messageSends: ["renderOn:", "codeWidget"],
+referencedClasses: []
 }),
 smalltalk.HLBrowserSourceWidget);
 

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

@@ -1,406 +1,4 @@
 smalltalk.addPackage('Helios-Core', {});
-smalltalk.addClass('HLSourceArea', smalltalk.Widget, ['editor', 'textarea', 'div', 'receiver', 'onDoIt'], 'Helios-Core');
-smalltalk.addMethod(
-"_clear",
-smalltalk.method({
-selector: "clear",
-fn: function () {
-    var self = this;
-    smalltalk.send(self, "_contents_", [""]);
-    return self;
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_contents",
-smalltalk.method({
-selector: "contents",
-fn: function () {
-    var self = this;
-    var $1;
-    $1 = smalltalk.send(self['@editor'], "_getValue", []);
-    return $1;
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_contents_",
-smalltalk.method({
-selector: "contents:",
-fn: function (aString) {
-    var self = this;
-    smalltalk.send(self['@editor'], "_setValue_", [aString]);
-    return self;
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_currentLine",
-smalltalk.method({
-selector: "currentLine",
-fn: function () {
-    var self = this;
-    var $1;
-    $1 = smalltalk.send(self['@editor'], "_getLine_", [smalltalk.send(smalltalk.send(self['@editor'], "_getCursor", []), "_line", [])]);
-    return $1;
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_currentLineOrSelection",
-smalltalk.method({
-selector: "currentLineOrSelection",
-fn: function () {
-    var self = this;
-    var $2, $1;
-    $2 = smalltalk.send(self['@editor'], "_somethingSelected", []);
-    if (smalltalk.assert($2)) {
-        $1 = smalltalk.send(self, "_selection", []);
-    } else {
-        $1 = smalltalk.send(self, "_currentLine", []);
-    }
-    return $1;
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_doIt",
-smalltalk.method({
-selector: "doIt",
-fn: function () {
-    var self = this;
-    var $1;
-    var result;
-    result = smalltalk.send(self, "_eval_", [smalltalk.send(self, "_currentLineOrSelection", [])]);
-    $1 = smalltalk.send(self, "_onDoIt", []);
-    if (($receiver = $1) == nil || $receiver == undefined) {
-    } else {
-        smalltalk.send(smalltalk.send(self, "_onDoIt", []), "_value", []);
-    }
-    return result;
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_editor",
-smalltalk.method({
-selector: "editor",
-fn: function () {
-    var self = this;
-    return self['@editor'];
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_eval_",
-smalltalk.method({
-selector: "eval:",
-fn: function (aString) {
-    var self = this;
-    var $1, $2;
-    var $early = {};
-    try {
-        var compiler;
-        compiler = smalltalk.send(smalltalk.Compiler || Compiler, "_new", []);
-        smalltalk.send(function () {return smalltalk.send(compiler, "_parseExpression_", [aString]);}, "_on_do_", [smalltalk.Error || Error, function (ex) {$1 = smalltalk.send(window, "_alert_", [smalltalk.send(ex, "_messageText", [])]);throw $early = [$1];}]);
-        $2 = smalltalk.send(smalltalk.send(smalltalk.send(compiler, "_eval_", [smalltalk.send(compiler, "_compile_forClass_", [smalltalk.send(smalltalk.send("doIt ^[", "__comma", [aString]), "__comma", ["] value"]), smalltalk.DoIt || DoIt])]), "_fn", []), "_applyTo_arguments_", [smalltalk.send(self, "_receiver", []), []]);
-        return $2;
-    } catch (e) {
-        if (e === $early) {
-            return e[0];
-        }
-        throw e;
-    }
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_fileIn",
-smalltalk.method({
-selector: "fileIn",
-fn: function () {
-    var self = this;
-    smalltalk.send(smalltalk.send(smalltalk.Importer || Importer, "_new", []), "_import_", [smalltalk.send(smalltalk.send(self, "_currentLineOrSelection", []), "_readStream", [])]);
-    return self;
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_handleKeyDown_",
-smalltalk.method({
-selector: "handleKeyDown:",
-fn: function (anEvent) {
-    var self = this;
-    if (anEvent.ctrlKey) {
-        if (anEvent.keyCode === 80) {
-            self._printIt();
-            anEvent.preventDefault();
-            return false;
-        }
-        if (anEvent.keyCode === 68) {
-            self._doIt();
-            anEvent.preventDefault();
-            return false;
-        }
-        if (anEvent.keyCode === 73) {
-            self._inspectIt();
-            anEvent.preventDefault();
-            return false;
-        }
-    }
-    return self;
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_inspectIt",
-smalltalk.method({
-selector: "inspectIt",
-fn: function () {
-    var self = this;
-    smalltalk.send(smalltalk.send(self, "_doIt", []), "_inspect", []);
-    return self;
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_onDoIt",
-smalltalk.method({
-selector: "onDoIt",
-fn: function () {
-    var self = this;
-    return self['@onDoIt'];
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_onDoIt_",
-smalltalk.method({
-selector: "onDoIt:",
-fn: function (aBlock) {
-    var self = this;
-    self['@onDoIt'] = aBlock;
-    return self;
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_onKeyDown_",
-smalltalk.method({
-selector: "onKeyDown:",
-fn: function (aBlock) {
-    var self = this;
-    smalltalk.send(self['@div'], "_onKeyDown_", [aBlock]);
-    return self;
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_onKeyUp_",
-smalltalk.method({
-selector: "onKeyUp:",
-fn: function (aBlock) {
-    var self = this;
-    smalltalk.send(self['@div'], "_onKeyUp_", [aBlock]);
-    return self;
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_print_",
-smalltalk.method({
-selector: "print:",
-fn: function (aString) {
-    var self = this;
-    var start;
-    var stop;
-    start = smalltalk.send(smalltalk.HashedCollection || HashedCollection, "_new", []);
-    stop = smalltalk.send(smalltalk.HashedCollection || HashedCollection, "_new", []);
-    smalltalk.send(start, "_at_put_", ["line", smalltalk.send(smalltalk.send(self['@editor'], "_getCursor_", [false]), "_line", [])]);
-    smalltalk.send(start, "_at_put_", ["ch", smalltalk.send(smalltalk.send(self['@editor'], "_getCursor_", [false]), "_ch", [])]);
-    smalltalk.send(stop, "_at_put_", ["line", smalltalk.send(start, "_at_", ["line"])]);
-    smalltalk.send(stop, "_at_put_", ["ch", smalltalk.send(smalltalk.send(smalltalk.send(start, "_at_", ["ch"]), "__plus", [smalltalk.send(aString, "_size", [])]), "__plus", [2])]);
-    smalltalk.send(self['@editor'], "_replaceSelection_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self['@editor'], "_getSelection", []), "__comma", [" "]), "__comma", [aString]), "__comma", [" "])]);
-    smalltalk.send(self['@editor'], "_setCursor_", [smalltalk.send(self['@editor'], "_getCursor_", [true])]);
-    smalltalk.send(self['@editor'], "_setSelection_end_", [stop, start]);
-    return self;
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_printIt",
-smalltalk.method({
-selector: "printIt",
-fn: function () {
-    var self = this;
-    smalltalk.send(self, "_print_", [smalltalk.send(smalltalk.send(self, "_doIt", []), "_printString", [])]);
-    return self;
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_receiver",
-smalltalk.method({
-selector: "receiver",
-fn: function () {
-    var self = this;
-    var $1;
-    if (($receiver = self['@receiver']) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(smalltalk.DoIt || DoIt, "_new", []);
-    } else {
-        $1 = self['@receiver'];
-    }
-    return $1;
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_receiver_",
-smalltalk.method({
-selector: "receiver:",
-fn: function (anObject) {
-    var self = this;
-    self['@receiver'] = anObject;
-    return self;
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_renderOn_",
-smalltalk.method({
-selector: "renderOn:",
-fn: function (html) {
-    var self = this;
-    self['@div'] = smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["source"]);
-    smalltalk.send(self['@div'], "_with_", [function () {self['@textarea'] = smalltalk.send(html, "_textarea", []);return self['@textarea'];}]);
-    smalltalk.send(self, "_setEditorOn_", [smalltalk.send(self['@textarea'], "_element", [])]);
-    smalltalk.send(self['@div'], "_onKeyDown_", [function (e) {return smalltalk.send(self, "_handleKeyDown_", [e]);}]);
-    return self;
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_selection",
-smalltalk.method({
-selector: "selection",
-fn: function () {
-    var self = this;
-    var $1;
-    $1 = smalltalk.send(self['@editor'], "_getSelection", []);
-    return $1;
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_selectionEnd",
-smalltalk.method({
-selector: "selectionEnd",
-fn: function () {
-    var self = this;
-    var $1;
-    $1 = smalltalk.send(smalltalk.send(self['@textarea'], "_element", []), "_selectionEnd", []);
-    return $1;
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_selectionEnd_",
-smalltalk.method({
-selector: "selectionEnd:",
-fn: function (anInteger) {
-    var self = this;
-    smalltalk.send(smalltalk.send(self['@textarea'], "_element", []), "_selectionEnd_", [anInteger]);
-    return self;
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_selectionStart",
-smalltalk.method({
-selector: "selectionStart",
-fn: function () {
-    var self = this;
-    var $1;
-    $1 = smalltalk.send(smalltalk.send(self['@textarea'], "_element", []), "_selectionStart", []);
-    return $1;
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_selectionStart_",
-smalltalk.method({
-selector: "selectionStart:",
-fn: function (anInteger) {
-    var self = this;
-    smalltalk.send(smalltalk.send(self['@textarea'], "_element", []), "_selectionStart_", [anInteger]);
-    return self;
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_setEditorOn_",
-smalltalk.method({
-selector: "setEditorOn:",
-fn: function (aTextarea) {
-    var self = this;
-    self['@editor'] = CodeMirror.fromTextArea(aTextarea, {theme: "amber", lineNumbers: true, enterMode: "flat", matchBrackets: true, electricChars: false});
-    return self;
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_val",
-smalltalk.method({
-selector: "val",
-fn: function () {
-    var self = this;
-    var $1;
-    $1 = smalltalk.send(self['@editor'], "_getValue", []);
-    return $1;
-}
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_val_",
-smalltalk.method({
-selector: "val:",
-fn: function (aString) {
-    var self = this;
-    smalltalk.send(self['@editor'], "_setValue_", [aString]);
-    return self;
-}
-}),
-smalltalk.HLSourceArea);
-
-
-
 smalltalk.addClass('HLTab', smalltalk.Object, ['widget', 'label'], 'Helios-Core');
 smalltalk.addMethod(
 "_activate",
@@ -523,7 +121,7 @@ fn: function (aWidget, aString) {
 smalltalk.HLTab.klass);
 
 
-smalltalk.addClass('HLWidget', smalltalk.Widget, ['rootDiv'], 'Helios-Core');
+smalltalk.addClass('HLWidget', smalltalk.Widget, ['wrapper'], 'Helios-Core');
 smalltalk.addMethod(
 "_manager",
 smalltalk.method({
@@ -543,13 +141,14 @@ smalltalk.method({
 selector: "refresh",
 fn: function () {
     var self = this;
-    if (($receiver = self['@rootDiv']) == nil || $receiver == undefined) {
+    var $1;
+    $1 = smalltalk.send(self, "_wrapper", []);
+    if (($receiver = $1) == nil || $receiver == undefined) {
         return self;
     } else {
-        self['@rootDiv'];
     }
-    smalltalk.send(smalltalk.send(self['@rootDiv'], "_asJQuery", []), "_empty", []);
-    smalltalk.send(function (html) {return smalltalk.send(self, "_renderContentOn_", [html]);}, "_appendToJQuery_", [smalltalk.send(self['@rootDiv'], "_asJQuery", [])]);
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_wrapper", []), "_asJQuery", []), "_empty", []);
+    smalltalk.send(function (html) {return smalltalk.send(self, "_renderContentOn_", [html]);}, "_appendToJQuery_", [smalltalk.send(smalltalk.send(self, "_wrapper", []), "_asJQuery", [])]);
     return self;
 }
 }),
@@ -596,19 +195,19 @@ selector: "renderOn:",
 fn: function (html) {
     var self = this;
     smalltalk.send(self, "_registerBindings", []);
-    self['@rootDiv'] = smalltalk.send(smalltalk.send(html, "_div", []), "_with_", [function () {return smalltalk.send(self, "_renderContentOn_", [html]);}]);
+    self['@wrapper'] = smalltalk.send(smalltalk.send(html, "_div", []), "_with_", [function () {return smalltalk.send(self, "_renderContentOn_", [html]);}]);
     return self;
 }
 }),
 smalltalk.HLWidget);
 
 smalltalk.addMethod(
-"_subscribeTo_",
+"_wrapper",
 smalltalk.method({
-selector: "subscribeTo:",
-fn: function (anAnnouncer) {
+selector: "wrapper",
+fn: function () {
     var self = this;
-    return self;
+    return self['@wrapper'];
 }
 }),
 smalltalk.HLWidget);
@@ -706,7 +305,7 @@ selector: "hasFocus",
 fn: function () {
     var self = this;
     var $1;
-    $1 = smalltalk.send(smalltalk.send(self['@rootDiv'], "_notNil", []), "_and_", [function () {return smalltalk.send(smalltalk.send(self['@rootDiv'], "_asJQuery", []), "_hasClass_", [smalltalk.send(self, "_focusClass", [])]);}]);
+    $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_wrapper", []), "_notNil", []), "_and_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(self, "_wrapper", []), "_asJQuery", []), "_hasClass_", [smalltalk.send(self, "_focusClass", [])]);}]);
     return $1;
 }
 }),
@@ -732,8 +331,8 @@ fn: function (html) {
     var $1, $2;
     $1 = smalltalk.send(html, "_input", []);
     smalltalk.send($1, "_style_", ["position: absolute; left: -100000px;"]);
-    smalltalk.send($1, "_onBlur_", [function () {return smalltalk.send(smalltalk.send(self['@rootDiv'], "_asJQuery", []), "_removeClass_", [smalltalk.send(self, "_focusClass", [])]);}]);
-    $2 = smalltalk.send($1, "_onFocus_", [function () {return smalltalk.send(smalltalk.send(self['@rootDiv'], "_asJQuery", []), "_addClass_", [smalltalk.send(self, "_focusClass", [])]);}]);
+    smalltalk.send($1, "_onBlur_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(self, "_wrapper", []), "_asJQuery", []), "_removeClass_", [smalltalk.send(self, "_focusClass", [])]);}]);
+    $2 = smalltalk.send($1, "_onFocus_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(self, "_wrapper", []), "_asJQuery", []), "_addClass_", [smalltalk.send(self, "_focusClass", [])]);}]);
     self['@hiddenInput'] = $2;
     return self;
 }
@@ -753,7 +352,7 @@ fn: function (html) {
     smalltalk.send($1, "_class_", ["hl_widget"]);
     smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(smalltalk.send(self['@hiddenInput'], "_asJQuery", []), "_focus", []);}]);
     $2 = smalltalk.send($1, "_with_", [function () {return smalltalk.send(self, "_renderContentOn_", [html]);}]);
-    self['@rootDiv'] = $2;
+    self['@wrapper'] = $2;
     return self;
 }
 }),
@@ -813,26 +412,23 @@ fn: function (anObject) {
 smalltalk.HLListWidget);
 
 smalltalk.addMethod(
-"_iconForItem_",
+"_defaultItems",
 smalltalk.method({
-selector: "iconForItem:",
-fn: function (anObject) {
+selector: "defaultItems",
+fn: function () {
     var self = this;
-    return "";
+    return [];
 }
 }),
 smalltalk.HLListWidget);
 
 smalltalk.addMethod(
-"_initializeItems",
+"_iconForItem_",
 smalltalk.method({
-selector: "initializeItems",
-fn: function () {
+selector: "iconForItem:",
+fn: function (anObject) {
     var self = this;
-    var $1;
-    self['@items'] = [];
-    $1 = self['@items'];
-    return $1;
+    return "";
 }
 }),
 smalltalk.HLListWidget);
@@ -845,7 +441,8 @@ fn: function () {
     var self = this;
     var $1;
     if (($receiver = self['@items']) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_initializeItems", []);
+        self['@items'] = smalltalk.send(self, "_defaultItems", []);
+        $1 = self['@items'];
     } else {
         $1 = self['@items'];
     }

+ 44 - 587
js/Helios-Core.js

@@ -1,546 +1,4 @@
 smalltalk.addPackage('Helios-Core', {});
-smalltalk.addClass('HLSourceArea', smalltalk.Widget, ['editor', 'textarea', 'div', 'receiver', 'onDoIt'], 'Helios-Core');
-smalltalk.addMethod(
-"_clear",
-smalltalk.method({
-selector: "clear",
-category: 'actions',
-fn: function () {
-    var self = this;
-    smalltalk.send(self, "_contents_", [""]);
-    return self;
-},
-args: [],
-source: "clear\x0a      self contents: ''",
-messageSends: ["contents:"],
-referencedClasses: []
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_contents",
-smalltalk.method({
-selector: "contents",
-category: 'accessing',
-fn: function () {
-    var self = this;
-    var $1;
-    $1 = smalltalk.send(self['@editor'], "_getValue", []);
-    return $1;
-},
-args: [],
-source: "contents\x0a    ^editor getValue",
-messageSends: ["getValue"],
-referencedClasses: []
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_contents_",
-smalltalk.method({
-selector: "contents:",
-category: 'accessing',
-fn: function (aString) {
-    var self = this;
-    smalltalk.send(self['@editor'], "_setValue_", [aString]);
-    return self;
-},
-args: ["aString"],
-source: "contents: aString\x0a    editor setValue: aString",
-messageSends: ["setValue:"],
-referencedClasses: []
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_currentLine",
-smalltalk.method({
-selector: "currentLine",
-category: 'accessing',
-fn: function () {
-    var self = this;
-    var $1;
-    $1 = smalltalk.send(self['@editor'], "_getLine_", [smalltalk.send(smalltalk.send(self['@editor'], "_getCursor", []), "_line", [])]);
-    return $1;
-},
-args: [],
-source: "currentLine\x0a    ^editor getLine: (editor getCursor line)",
-messageSends: ["getLine:", "line", "getCursor"],
-referencedClasses: []
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_currentLineOrSelection",
-smalltalk.method({
-selector: "currentLineOrSelection",
-category: 'accessing',
-fn: function () {
-    var self = this;
-    var $2, $1;
-    $2 = smalltalk.send(self['@editor'], "_somethingSelected", []);
-    if (smalltalk.assert($2)) {
-        $1 = smalltalk.send(self, "_selection", []);
-    } else {
-        $1 = smalltalk.send(self, "_currentLine", []);
-    }
-    return $1;
-},
-args: [],
-source: "currentLineOrSelection\x0a    ^editor somethingSelected\x0a\x09ifFalse: [self currentLine]\x0a\x09ifTrue: [self selection]",
-messageSends: ["ifFalse:ifTrue:", "currentLine", "selection", "somethingSelected"],
-referencedClasses: []
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_doIt",
-smalltalk.method({
-selector: "doIt",
-category: 'actions',
-fn: function () {
-    var self = this;
-    var $1;
-    var result;
-    result = smalltalk.send(self, "_eval_", [smalltalk.send(self, "_currentLineOrSelection", [])]);
-    $1 = smalltalk.send(self, "_onDoIt", []);
-    if (($receiver = $1) == nil || $receiver == undefined) {
-    } else {
-        smalltalk.send(smalltalk.send(self, "_onDoIt", []), "_value", []);
-    }
-    return result;
-},
-args: [],
-source: "doIt\x0a    | result |\x0a    result := self eval: self currentLineOrSelection.\x0a    self onDoIt ifNotNil: [self onDoIt value].\x0a    ^result",
-messageSends: ["eval:", "currentLineOrSelection", "ifNotNil:", "value", "onDoIt"],
-referencedClasses: []
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_editor",
-smalltalk.method({
-selector: "editor",
-category: 'accessing',
-fn: function () {
-    var self = this;
-    return self['@editor'];
-},
-args: [],
-source: "editor\x0a\x09^editor",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_eval_",
-smalltalk.method({
-selector: "eval:",
-category: 'actions',
-fn: function (aString) {
-    var self = this;
-    var $1, $2;
-    var $early = {};
-    try {
-        var compiler;
-        compiler = smalltalk.send(smalltalk.Compiler || Compiler, "_new", []);
-        smalltalk.send(function () {return smalltalk.send(compiler, "_parseExpression_", [aString]);}, "_on_do_", [smalltalk.Error || Error, function (ex) {$1 = smalltalk.send(window, "_alert_", [smalltalk.send(ex, "_messageText", [])]);throw $early = [$1];}]);
-        $2 = smalltalk.send(smalltalk.send(smalltalk.send(compiler, "_eval_", [smalltalk.send(compiler, "_compile_forClass_", [smalltalk.send(smalltalk.send("doIt ^[", "__comma", [aString]), "__comma", ["] value"]), smalltalk.DoIt || DoIt])]), "_fn", []), "_applyTo_arguments_", [smalltalk.send(self, "_receiver", []), []]);
-        return $2;
-    } catch (e) {
-        if (e === $early) {
-            return e[0];
-        }
-        throw e;
-    }
-},
-args: ["aString"],
-source: "eval: aString\x0a\x09| compiler  |\x0a\x09compiler := Compiler new.\x0a\x09[compiler parseExpression: aString] on: Error do: [:ex |\x0a\x09\x09^window alert: ex messageText].\x0a\x09^(compiler eval: (compiler compile: 'doIt ^[', aString, '] value' forClass: DoIt)) fn applyTo: self receiver arguments: #()",
-messageSends: ["new", "on:do:", "alert:", "messageText", "parseExpression:", "applyTo:arguments:", "receiver", "fn", "eval:", "compile:forClass:", ","],
-referencedClasses: ["Compiler", "Error", "DoIt"]
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_fileIn",
-smalltalk.method({
-selector: "fileIn",
-category: 'actions',
-fn: function () {
-    var self = this;
-    smalltalk.send(smalltalk.send(smalltalk.Importer || Importer, "_new", []), "_import_", [smalltalk.send(smalltalk.send(self, "_currentLineOrSelection", []), "_readStream", [])]);
-    return self;
-},
-args: [],
-source: "fileIn\x0a    Importer new import: self currentLineOrSelection readStream",
-messageSends: ["import:", "readStream", "currentLineOrSelection", "new"],
-referencedClasses: ["Importer"]
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_handleKeyDown_",
-smalltalk.method({
-selector: "handleKeyDown:",
-category: 'actions',
-fn: function (anEvent) {
-    var self = this;
-    if (anEvent.ctrlKey) {
-        if (anEvent.keyCode === 80) {
-            self._printIt();
-            anEvent.preventDefault();
-            return false;
-        }
-        if (anEvent.keyCode === 68) {
-            self._doIt();
-            anEvent.preventDefault();
-            return false;
-        }
-        if (anEvent.keyCode === 73) {
-            self._inspectIt();
-            anEvent.preventDefault();
-            return false;
-        }
-    }
-    return self;
-},
-args: ["anEvent"],
-source: "handleKeyDown: anEvent\x0a    <if(anEvent.ctrlKey) {\x0a\x09\x09if(anEvent.keyCode === 80) { //ctrl+p\x0a\x09\x09\x09self._printIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 68) { //ctrl+d\x0a\x09\x09\x09self._doIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 73) { //ctrl+i\x0a\x09\x09\x09self._inspectIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09}>",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_inspectIt",
-smalltalk.method({
-selector: "inspectIt",
-category: 'actions',
-fn: function () {
-    var self = this;
-    smalltalk.send(smalltalk.send(self, "_doIt", []), "_inspect", []);
-    return self;
-},
-args: [],
-source: "inspectIt\x0a    self doIt inspect",
-messageSends: ["inspect", "doIt"],
-referencedClasses: []
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_onDoIt",
-smalltalk.method({
-selector: "onDoIt",
-category: 'accessing',
-fn: function () {
-    var self = this;
-    return self['@onDoIt'];
-},
-args: [],
-source: "onDoIt\x0a\x09^onDoIt",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_onDoIt_",
-smalltalk.method({
-selector: "onDoIt:",
-category: 'accessing',
-fn: function (aBlock) {
-    var self = this;
-    self['@onDoIt'] = aBlock;
-    return self;
-},
-args: ["aBlock"],
-source: "onDoIt: aBlock\x0a\x09onDoIt := aBlock",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_onKeyDown_",
-smalltalk.method({
-selector: "onKeyDown:",
-category: 'events',
-fn: function (aBlock) {
-    var self = this;
-    smalltalk.send(self['@div'], "_onKeyDown_", [aBlock]);
-    return self;
-},
-args: ["aBlock"],
-source: "onKeyDown: aBlock\x0a\x09div onKeyDown: aBlock",
-messageSends: ["onKeyDown:"],
-referencedClasses: []
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_onKeyUp_",
-smalltalk.method({
-selector: "onKeyUp:",
-category: 'events',
-fn: function (aBlock) {
-    var self = this;
-    smalltalk.send(self['@div'], "_onKeyUp_", [aBlock]);
-    return self;
-},
-args: ["aBlock"],
-source: "onKeyUp: aBlock\x0a\x09div onKeyUp: aBlock",
-messageSends: ["onKeyUp:"],
-referencedClasses: []
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_print_",
-smalltalk.method({
-selector: "print:",
-category: 'actions',
-fn: function (aString) {
-    var self = this;
-    var start;
-    var stop;
-    start = smalltalk.send(smalltalk.HashedCollection || HashedCollection, "_new", []);
-    stop = smalltalk.send(smalltalk.HashedCollection || HashedCollection, "_new", []);
-    smalltalk.send(start, "_at_put_", ["line", smalltalk.send(smalltalk.send(self['@editor'], "_getCursor_", [false]), "_line", [])]);
-    smalltalk.send(start, "_at_put_", ["ch", smalltalk.send(smalltalk.send(self['@editor'], "_getCursor_", [false]), "_ch", [])]);
-    smalltalk.send(stop, "_at_put_", ["line", smalltalk.send(start, "_at_", ["line"])]);
-    smalltalk.send(stop, "_at_put_", ["ch", smalltalk.send(smalltalk.send(smalltalk.send(start, "_at_", ["ch"]), "__plus", [smalltalk.send(aString, "_size", [])]), "__plus", [2])]);
-    smalltalk.send(self['@editor'], "_replaceSelection_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self['@editor'], "_getSelection", []), "__comma", [" "]), "__comma", [aString]), "__comma", [" "])]);
-    smalltalk.send(self['@editor'], "_setCursor_", [smalltalk.send(self['@editor'], "_getCursor_", [true])]);
-    smalltalk.send(self['@editor'], "_setSelection_end_", [stop, start]);
-    return self;
-},
-args: ["aString"],
-source: "print: aString\x0a\x09| start stop |\x0a\x09start := HashedCollection new.\x0a\x09stop := HashedCollection new.\x0a\x09start at: 'line' put: (editor getCursor: false) line.\x0a\x09start at: 'ch' put: (editor getCursor: false) ch.\x0a\x09stop at: 'line' put: (start at: 'line').\x0a\x09stop at: 'ch' put: ((start at: 'ch') + aString size + 2).\x0a\x09editor replaceSelection: (editor getSelection, ' ', aString, ' ').\x0a\x09editor setCursor: (editor getCursor: true).\x0a\x09editor setSelection: stop end: start",
-messageSends: ["new", "at:put:", "line", "getCursor:", "ch", "at:", "+", "size", "replaceSelection:", ",", "getSelection", "setCursor:", "setSelection:end:"],
-referencedClasses: ["HashedCollection"]
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_printIt",
-smalltalk.method({
-selector: "printIt",
-category: 'actions',
-fn: function () {
-    var self = this;
-    smalltalk.send(self, "_print_", [smalltalk.send(smalltalk.send(self, "_doIt", []), "_printString", [])]);
-    return self;
-},
-args: [],
-source: "printIt\x0a    self print: self doIt printString",
-messageSends: ["print:", "printString", "doIt"],
-referencedClasses: []
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_receiver",
-smalltalk.method({
-selector: "receiver",
-category: 'accessing',
-fn: function () {
-    var self = this;
-    var $1;
-    if (($receiver = self['@receiver']) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(smalltalk.DoIt || DoIt, "_new", []);
-    } else {
-        $1 = self['@receiver'];
-    }
-    return $1;
-},
-args: [],
-source: "receiver\x0a\x09^receiver ifNil: [DoIt new]",
-messageSends: ["ifNil:", "new"],
-referencedClasses: ["DoIt"]
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_receiver_",
-smalltalk.method({
-selector: "receiver:",
-category: 'accessing',
-fn: function (anObject) {
-    var self = this;
-    self['@receiver'] = anObject;
-    return self;
-},
-args: ["anObject"],
-source: "receiver: anObject\x0a\x09receiver := anObject",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_renderOn_",
-smalltalk.method({
-selector: "renderOn:",
-category: 'rendering',
-fn: function (html) {
-    var self = this;
-    self['@div'] = smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["source"]);
-    smalltalk.send(self['@div'], "_with_", [function () {self['@textarea'] = smalltalk.send(html, "_textarea", []);return self['@textarea'];}]);
-    smalltalk.send(self, "_setEditorOn_", [smalltalk.send(self['@textarea'], "_element", [])]);
-    smalltalk.send(self['@div'], "_onKeyDown_", [function (e) {return smalltalk.send(self, "_handleKeyDown_", [e]);}]);
-    return self;
-},
-args: ["html"],
-source: "renderOn: html\x0a    div := html div class: 'source'.\x0a    div with: [textarea := html textarea].\x0a    self setEditorOn: textarea element.\x0a    div onKeyDown: [:e | self handleKeyDown: e]",
-messageSends: ["class:", "div", "with:", "textarea", "setEditorOn:", "element", "onKeyDown:", "handleKeyDown:"],
-referencedClasses: []
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_selection",
-smalltalk.method({
-selector: "selection",
-category: 'accessing',
-fn: function () {
-    var self = this;
-    var $1;
-    $1 = smalltalk.send(self['@editor'], "_getSelection", []);
-    return $1;
-},
-args: [],
-source: "selection\x0a\x09^editor getSelection",
-messageSends: ["getSelection"],
-referencedClasses: []
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_selectionEnd",
-smalltalk.method({
-selector: "selectionEnd",
-category: 'accessing',
-fn: function () {
-    var self = this;
-    var $1;
-    $1 = smalltalk.send(smalltalk.send(self['@textarea'], "_element", []), "_selectionEnd", []);
-    return $1;
-},
-args: [],
-source: "selectionEnd\x0a   ^textarea element selectionEnd",
-messageSends: ["selectionEnd", "element"],
-referencedClasses: []
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_selectionEnd_",
-smalltalk.method({
-selector: "selectionEnd:",
-category: 'accessing',
-fn: function (anInteger) {
-    var self = this;
-    smalltalk.send(smalltalk.send(self['@textarea'], "_element", []), "_selectionEnd_", [anInteger]);
-    return self;
-},
-args: ["anInteger"],
-source: "selectionEnd: anInteger\x0a   textarea element selectionEnd: anInteger",
-messageSends: ["selectionEnd:", "element"],
-referencedClasses: []
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_selectionStart",
-smalltalk.method({
-selector: "selectionStart",
-category: 'accessing',
-fn: function () {
-    var self = this;
-    var $1;
-    $1 = smalltalk.send(smalltalk.send(self['@textarea'], "_element", []), "_selectionStart", []);
-    return $1;
-},
-args: [],
-source: "selectionStart\x0a   ^textarea element selectionStart",
-messageSends: ["selectionStart", "element"],
-referencedClasses: []
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_selectionStart_",
-smalltalk.method({
-selector: "selectionStart:",
-category: 'accessing',
-fn: function (anInteger) {
-    var self = this;
-    smalltalk.send(smalltalk.send(self['@textarea'], "_element", []), "_selectionStart_", [anInteger]);
-    return self;
-},
-args: ["anInteger"],
-source: "selectionStart: anInteger\x0a   textarea element selectionStart: anInteger",
-messageSends: ["selectionStart:", "element"],
-referencedClasses: []
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_setEditorOn_",
-smalltalk.method({
-selector: "setEditorOn:",
-category: 'accessing',
-fn: function (aTextarea) {
-    var self = this;
-    self['@editor'] = CodeMirror.fromTextArea(aTextarea, {theme: "amber", lineNumbers: true, enterMode: "flat", matchBrackets: true, electricChars: false});
-    return self;
-},
-args: ["aTextarea"],
-source: "setEditorOn: aTextarea\x0a\x09<self['@editor'] = CodeMirror.fromTextArea(aTextarea, {\x0a\x09\x09theme: 'amber',\x0a                lineNumbers: true,\x0a                enterMode: 'flat',\x0a                matchBrackets: true,\x0a                electricChars: false\x0a\x09})>",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_val",
-smalltalk.method({
-selector: "val",
-category: 'accessing',
-fn: function () {
-    var self = this;
-    var $1;
-    $1 = smalltalk.send(self['@editor'], "_getValue", []);
-    return $1;
-},
-args: [],
-source: "val\x0a    ^editor getValue",
-messageSends: ["getValue"],
-referencedClasses: []
-}),
-smalltalk.HLSourceArea);
-
-smalltalk.addMethod(
-"_val_",
-smalltalk.method({
-selector: "val:",
-category: 'accessing',
-fn: function (aString) {
-    var self = this;
-    smalltalk.send(self['@editor'], "_setValue_", [aString]);
-    return self;
-},
-args: ["aString"],
-source: "val: aString\x0a    editor setValue: aString",
-messageSends: ["setValue:"],
-referencedClasses: []
-}),
-smalltalk.HLSourceArea);
-
-
-
 smalltalk.addClass('HLTab', smalltalk.Object, ['widget', 'label'], 'Helios-Core');
 smalltalk.addMethod(
 "_activate",
@@ -708,7 +166,7 @@ referencedClasses: []
 smalltalk.HLTab.klass);
 
 
-smalltalk.addClass('HLWidget', smalltalk.Widget, ['rootDiv'], 'Helios-Core');
+smalltalk.addClass('HLWidget', smalltalk.Widget, ['wrapper'], 'Helios-Core');
 smalltalk.addMethod(
 "_manager",
 smalltalk.method({
@@ -734,18 +192,19 @@ selector: "refresh",
 category: 'updating',
 fn: function () {
     var self = this;
-    if (($receiver = self['@rootDiv']) == nil || $receiver == undefined) {
+    var $1;
+    $1 = smalltalk.send(self, "_wrapper", []);
+    if (($receiver = $1) == nil || $receiver == undefined) {
         return self;
     } else {
-        self['@rootDiv'];
     }
-    smalltalk.send(smalltalk.send(self['@rootDiv'], "_asJQuery", []), "_empty", []);
-    smalltalk.send(function (html) {return smalltalk.send(self, "_renderContentOn_", [html]);}, "_appendToJQuery_", [smalltalk.send(self['@rootDiv'], "_asJQuery", [])]);
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_wrapper", []), "_asJQuery", []), "_empty", []);
+    smalltalk.send(function (html) {return smalltalk.send(self, "_renderContentOn_", [html]);}, "_appendToJQuery_", [smalltalk.send(smalltalk.send(self, "_wrapper", []), "_asJQuery", [])]);
     return self;
 },
 args: [],
-source: "refresh\x0a\x09rootDiv ifNil: [ ^ self ].\x0a    \x0a\x09rootDiv asJQuery empty.\x0a    [ :html | self renderContentOn: html ] appendToJQuery: rootDiv asJQuery",
-messageSends: ["ifNil:", "empty", "asJQuery", "appendToJQuery:", "renderContentOn:"],
+source: "refresh\x0a\x09self wrapper ifNil: [ ^ self ].\x0a    \x0a\x09self wrapper asJQuery empty.\x0a    [ :html | self renderContentOn: html ] appendToJQuery: self wrapper asJQuery",
+messageSends: ["ifNil:", "wrapper", "empty", "asJQuery", "appendToJQuery:", "renderContentOn:"],
 referencedClasses: []
 }),
 smalltalk.HLWidget);
@@ -807,27 +266,27 @@ category: 'rendering',
 fn: function (html) {
     var self = this;
     smalltalk.send(self, "_registerBindings", []);
-    self['@rootDiv'] = smalltalk.send(smalltalk.send(html, "_div", []), "_with_", [function () {return smalltalk.send(self, "_renderContentOn_", [html]);}]);
+    self['@wrapper'] = smalltalk.send(smalltalk.send(html, "_div", []), "_with_", [function () {return smalltalk.send(self, "_renderContentOn_", [html]);}]);
     return self;
 },
 args: ["html"],
-source: "renderOn: html\x0a    self registerBindings.\x0a\x0a\x09rootDiv := html div with: [\x0a    \x09self renderContentOn: html ]",
+source: "renderOn: html\x0a    self registerBindings.\x0a\x0a\x09wrapper := html div with: [\x0a    \x09self renderContentOn: html ]",
 messageSends: ["registerBindings", "with:", "renderContentOn:", "div"],
 referencedClasses: []
 }),
 smalltalk.HLWidget);
 
 smalltalk.addMethod(
-"_subscribeTo_",
+"_wrapper",
 smalltalk.method({
-selector: "subscribeTo:",
-category: 'announcements',
-fn: function (anAnnouncer) {
+selector: "wrapper",
+category: 'accessing',
+fn: function () {
     var self = this;
-    return self;
+    return self['@wrapper'];
 },
-args: ["anAnnouncer"],
-source: "subscribeTo: anAnnouncer",
+args: [],
+source: "wrapper\x0a\x09^ wrapper",
 messageSends: [],
 referencedClasses: []
 }),
@@ -962,12 +421,12 @@ category: 'events',
 fn: function () {
     var self = this;
     var $1;
-    $1 = smalltalk.send(smalltalk.send(self['@rootDiv'], "_notNil", []), "_and_", [function () {return smalltalk.send(smalltalk.send(self['@rootDiv'], "_asJQuery", []), "_hasClass_", [smalltalk.send(self, "_focusClass", [])]);}]);
+    $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_wrapper", []), "_notNil", []), "_and_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(self, "_wrapper", []), "_asJQuery", []), "_hasClass_", [smalltalk.send(self, "_focusClass", [])]);}]);
     return $1;
 },
 args: [],
-source: "hasFocus\x0a\x09^ rootDiv notNil and: [ rootDiv asJQuery hasClass: self focusClass ]",
-messageSends: ["and:", "hasClass:", "focusClass", "asJQuery", "notNil"],
+source: "hasFocus\x0a\x09^ self wrapper notNil and: [ self wrapper asJQuery hasClass: self focusClass ]",
+messageSends: ["and:", "hasClass:", "focusClass", "asJQuery", "wrapper", "notNil"],
 referencedClasses: []
 }),
 smalltalk.HLFocusableWidget);
@@ -998,14 +457,14 @@ fn: function (html) {
     var $1, $2;
     $1 = smalltalk.send(html, "_input", []);
     smalltalk.send($1, "_style_", ["position: absolute; left: -100000px;"]);
-    smalltalk.send($1, "_onBlur_", [function () {return smalltalk.send(smalltalk.send(self['@rootDiv'], "_asJQuery", []), "_removeClass_", [smalltalk.send(self, "_focusClass", [])]);}]);
-    $2 = smalltalk.send($1, "_onFocus_", [function () {return smalltalk.send(smalltalk.send(self['@rootDiv'], "_asJQuery", []), "_addClass_", [smalltalk.send(self, "_focusClass", [])]);}]);
+    smalltalk.send($1, "_onBlur_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(self, "_wrapper", []), "_asJQuery", []), "_removeClass_", [smalltalk.send(self, "_focusClass", [])]);}]);
+    $2 = smalltalk.send($1, "_onFocus_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(self, "_wrapper", []), "_asJQuery", []), "_addClass_", [smalltalk.send(self, "_focusClass", [])]);}]);
     self['@hiddenInput'] = $2;
     return self;
 },
 args: ["html"],
-source: "renderHiddenInputOn: html\x0a\x09hiddenInput := html input\x0a    \x09style: 'position: absolute; left: -100000px;';\x0a    \x09onBlur: [ rootDiv asJQuery removeClass: self focusClass ];\x0a        onFocus: [ rootDiv asJQuery addClass: self focusClass ]",
-messageSends: ["style:", "input", "onBlur:", "removeClass:", "focusClass", "asJQuery", "onFocus:", "addClass:"],
+source: "renderHiddenInputOn: html\x0a\x09hiddenInput := html input\x0a    \x09style: 'position: absolute; left: -100000px;';\x0a    \x09onBlur: [ self wrapper asJQuery removeClass: self focusClass ];\x0a        onFocus: [ self wrapper asJQuery addClass: self focusClass ]",
+messageSends: ["style:", "input", "onBlur:", "removeClass:", "focusClass", "asJQuery", "wrapper", "onFocus:", "addClass:"],
 referencedClasses: []
 }),
 smalltalk.HLFocusableWidget);
@@ -1024,11 +483,11 @@ fn: function (html) {
     smalltalk.send($1, "_class_", ["hl_widget"]);
     smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(smalltalk.send(self['@hiddenInput'], "_asJQuery", []), "_focus", []);}]);
     $2 = smalltalk.send($1, "_with_", [function () {return smalltalk.send(self, "_renderContentOn_", [html]);}]);
-    self['@rootDiv'] = $2;
+    self['@wrapper'] = $2;
     return self;
 },
 args: ["html"],
-source: "renderOn: html\x0a\x09self registerBindings.\x0a\x09self renderHiddenInputOn: html.\x0a    \x0a    rootDiv := html div \x0a    \x09class: 'hl_widget'; \x0a        onClick: [ hiddenInput asJQuery focus ];\x0a        with: [\x0a\x09\x09\x09self renderContentOn: html ]",
+source: "renderOn: html\x0a\x09self registerBindings.\x0a\x09self renderHiddenInputOn: html.\x0a    \x0a    wrapper := html div \x0a    \x09class: 'hl_widget'; \x0a        onClick: [ hiddenInput asJQuery focus ];\x0a        with: [\x0a\x09\x09\x09self renderContentOn: html ]",
 messageSends: ["registerBindings", "renderHiddenInputOn:", "class:", "div", "onClick:", "focus", "asJQuery", "with:", "renderContentOn:"],
 referencedClasses: []
 }),
@@ -1098,35 +557,32 @@ referencedClasses: []
 smalltalk.HLListWidget);
 
 smalltalk.addMethod(
-"_iconForItem_",
+"_defaultItems",
 smalltalk.method({
-selector: "iconForItem:",
-category: 'accessing',
-fn: function (anObject) {
+selector: "defaultItems",
+category: 'defaults',
+fn: function () {
     var self = this;
-    return "";
+    return [];
 },
-args: ["anObject"],
-source: "iconForItem: anObject\x0a\x09^ ''",
+args: [],
+source: "defaultItems\x0a\x09^ #()",
 messageSends: [],
 referencedClasses: []
 }),
 smalltalk.HLListWidget);
 
 smalltalk.addMethod(
-"_initializeItems",
+"_iconForItem_",
 smalltalk.method({
-selector: "initializeItems",
-category: 'initializing',
-fn: function () {
+selector: "iconForItem:",
+category: 'accessing',
+fn: function (anObject) {
     var self = this;
-    var $1;
-    self['@items'] = [];
-    $1 = self['@items'];
-    return $1;
+    return "";
 },
-args: [],
-source: "initializeItems\x0a\x09^ items := #()",
+args: ["anObject"],
+source: "iconForItem: anObject\x0a\x09^ ''",
 messageSends: [],
 referencedClasses: []
 }),
@@ -1141,15 +597,16 @@ fn: function () {
     var self = this;
     var $1;
     if (($receiver = self['@items']) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_initializeItems", []);
+        self['@items'] = smalltalk.send(self, "_defaultItems", []);
+        $1 = self['@items'];
     } else {
         $1 = self['@items'];
     }
     return $1;
 },
 args: [],
-source: "items\x0a\x09^ items ifNil: [ self initializeItems ]",
-messageSends: ["ifNil:", "initializeItems"],
+source: "items\x0a\x09^ items ifNil: [ items := self defaultItems ]",
+messageSends: ["ifNil:", "defaultItems"],
 referencedClasses: []
 }),
 smalltalk.HLListWidget);

+ 95 - 270
js/Helios-Inspector.deploy.js

@@ -1,33 +1,21 @@
 smalltalk.addPackage('Helios-Inspector', {});
-smalltalk.addClass('HLInspector', smalltalk.HLWidget, ['model', 'variables', 'display', 'code', 'label'], 'Helios-Inspector');
+smalltalk.addClass('HLInspector', smalltalk.HLWidget, ['model', 'variablesWidget', 'displayWidget', 'codeWidget', 'label'], 'Helios-Inspector');
 smalltalk.addMethod(
-"_code",
+"_codeWidget",
 smalltalk.method({
-selector: "code",
+selector: "codeWidget",
 fn: function () {
     var self = this;
-    var $1;
-    if (($receiver = self['@code']) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_initializeCode", []);
-    } else {
-        $1 = self['@code'];
-    }
-    return $1;
-}
-}),
-smalltalk.HLInspector);
-
-smalltalk.addMethod(
-"_display",
-smalltalk.method({
-selector: "display",
-fn: function () {
-    var self = this;
-    var $1;
-    if (($receiver = self['@display']) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_initializeDisplay", []);
+    var $2, $3, $1;
+    if (($receiver = self['@codeWidget']) == nil || $receiver == undefined) {
+        $2 = smalltalk.send(smalltalk.HLCodeWidget || HLCodeWidget, "_new", []);
+        smalltalk.send($2, "_model_", [smalltalk.send(self['@model'], "_code", [])]);
+        smalltalk.send($2, "_receiver_", [smalltalk.send(self['@model'], "_inspectee", [])]);
+        $3 = smalltalk.send($2, "_yourself", []);
+        self['@codeWidget'] = $3;
+        $1 = self['@codeWidget'];
     } else {
-        $1 = self['@display'];
+        $1 = self['@codeWidget'];
     }
     return $1;
 }
@@ -35,87 +23,22 @@ fn: function () {
 smalltalk.HLInspector);
 
 smalltalk.addMethod(
-"_ensureModel",
+"_displayWidget",
 smalltalk.method({
-selector: "ensureModel",
+selector: "displayWidget",
 fn: function () {
     var self = this;
-    smalltalk.send(self, "_observeVariables", []);
-    if (($receiver = self['@model']) == nil || $receiver == undefined) {
-        smalltalk.send(self, "_model_", [smalltalk.send(self, "_model", [])]);
+    var $2, $3, $1;
+    if (($receiver = self['@displayWidget']) == nil ||
+        $receiver == undefined) {
+        $2 = smalltalk.send(smalltalk.HLInspectorDisplayWidget || HLInspectorDisplayWidget, "_new", []);
+        smalltalk.send($2, "_model_", [smalltalk.send(self, "_model", [])]);
+        $3 = smalltalk.send($2, "_yourself", []);
+        self['@displayWidget'] = $3;
+        $1 = self['@displayWidget'];
     } else {
-        self['@model'];
+        $1 = self['@displayWidget'];
     }
-    return self;
-}
-}),
-smalltalk.HLInspector);
-
-smalltalk.addMethod(
-"_initializeCode",
-smalltalk.method({
-selector: "initializeCode",
-fn: function () {
-    var self = this;
-    var $1;
-    self['@code'] = smalltalk.send(self, "_makeCode", []);
-    $1 = self['@code'];
-    return $1;
-}
-}),
-smalltalk.HLInspector);
-
-smalltalk.addMethod(
-"_initializeDisplay",
-smalltalk.method({
-selector: "initializeDisplay",
-fn: function () {
-    var self = this;
-    var $1;
-    self['@display'] = smalltalk.send(self, "_makeDisplay", []);
-    $1 = self['@display'];
-    return $1;
-}
-}),
-smalltalk.HLInspector);
-
-smalltalk.addMethod(
-"_initializeLabel",
-smalltalk.method({
-selector: "initializeLabel",
-fn: function () {
-    var self = this;
-    var $1;
-    self['@label'] = smalltalk.send(smalltalk.send(self['@model'], "_inspectee", []), "_printString", []);
-    $1 = self['@label'];
-    return $1;
-}
-}),
-smalltalk.HLInspector);
-
-smalltalk.addMethod(
-"_initializeModel",
-smalltalk.method({
-selector: "initializeModel",
-fn: function () {
-    var self = this;
-    var $1;
-    self['@model'] = smalltalk.send(smalltalk.HLInspectorModel || HLInspectorModel, "_new", []);
-    $1 = self['@model'];
-    return $1;
-}
-}),
-smalltalk.HLInspector);
-
-smalltalk.addMethod(
-"_initializeVariables",
-smalltalk.method({
-selector: "initializeVariables",
-fn: function () {
-    var self = this;
-    var $1;
-    self['@variables'] = smalltalk.send(self, "_makeVariables", []);
-    $1 = self['@variables'];
     return $1;
 }
 }),
@@ -129,9 +52,8 @@ fn: function (anObject) {
     var self = this;
     var $1;
     smalltalk.send(smalltalk.send(self, "_model", []), "_inspect_on_", [anObject, self]);
-    smalltalk.send(self, "_refreshVariables", []);
-    smalltalk.send(self, "_refreshDisplay", []);
-    $1 = smalltalk.send(self, "_yourself", []);
+    smalltalk.send(self, "_refreshVariablesWidget", []);
+    $1 = smalltalk.send(self, "_refreshDisplayWidget", []);
     return self;
 }
 }),
@@ -170,7 +92,7 @@ fn: function () {
     var self = this;
     var $1;
     if (($receiver = self['@label']) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_initializeLabel", []);
+        $1 = smalltalk.send(smalltalk.send(self['@model'], "_inspectee", []), "_printString", []);
     } else {
         $1 = self['@label'];
     }
@@ -179,55 +101,6 @@ fn: function () {
 }),
 smalltalk.HLInspector);
 
-smalltalk.addMethod(
-"_makeCode",
-smalltalk.method({
-selector: "makeCode",
-fn: function () {
-    var self = this;
-    var $2, $3, $1;
-    $2 = smalltalk.send(smalltalk.HLCodeWidget || HLCodeWidget, "_new", []);
-    smalltalk.send($2, "_model_", [smalltalk.send(self['@model'], "_code", [])]);
-    smalltalk.send($2, "_receiver_", [smalltalk.send(self['@model'], "_inspectee", [])]);
-    $3 = smalltalk.send($2, "_yourself", []);
-    $1 = $3;
-    return $1;
-}
-}),
-smalltalk.HLInspector);
-
-smalltalk.addMethod(
-"_makeDisplay",
-smalltalk.method({
-selector: "makeDisplay",
-fn: function () {
-    var self = this;
-    var $2, $3, $1;
-    $2 = smalltalk.send(smalltalk.HLInspectorDisplay || HLInspectorDisplay, "_new", []);
-    smalltalk.send($2, "_model_", [smalltalk.send(self, "_model", [])]);
-    $3 = smalltalk.send($2, "_yourself", []);
-    $1 = $3;
-    return $1;
-}
-}),
-smalltalk.HLInspector);
-
-smalltalk.addMethod(
-"_makeVariables",
-smalltalk.method({
-selector: "makeVariables",
-fn: function () {
-    var self = this;
-    var $2, $3, $1;
-    $2 = smalltalk.send(smalltalk.HLInspectorVariables || HLInspectorVariables, "_new", []);
-    smalltalk.send($2, "_model_", [smalltalk.send(self, "_model", [])]);
-    $3 = smalltalk.send($2, "_yourself", []);
-    $1 = $3;
-    return $1;
-}
-}),
-smalltalk.HLInspector);
-
 smalltalk.addMethod(
 "_model",
 smalltalk.method({
@@ -236,7 +109,8 @@ fn: function () {
     var self = this;
     var $1;
     if (($receiver = self['@model']) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_initializeModel", []);
+        smalltalk.send(self, "_model_", [smalltalk.send(smalltalk.HLInspectorModel || HLInspectorModel, "_new", [])]);
+        $1 = self['@model'];
     } else {
         $1 = self['@model'];
     }
@@ -251,63 +125,63 @@ smalltalk.method({
 selector: "model:",
 fn: function (aModel) {
     var self = this;
+    var $1;
     self['@model'] = aModel;
-    smalltalk.send(smalltalk.send(self, "_code", []), "_model_", [smalltalk.send(aModel, "_code", [])]);
-    smalltalk.send(self, "_observeCode", []);
+    smalltalk.send(smalltalk.send(self, "_codeWidget", []), "_model_", [smalltalk.send(aModel, "_code", [])]);
+    smalltalk.send(self, "_observeCodeWidget", []);
+    smalltalk.send(self, "_observeVariablesWidget", []);
+    $1 = smalltalk.send(self, "_observeModel", []);
     return self;
 }
 }),
 smalltalk.HLInspector);
 
 smalltalk.addMethod(
-"_observeCode",
+"_observeCodeWidget",
 smalltalk.method({
-selector: "observeCode",
+selector: "observeCodeWidget",
 fn: function () {
     var self = this;
-    smalltalk.send(smalltalk.send(smalltalk.send(self, "_code", []), "_announcer", []), "_on_do_", [smalltalk.HLDoItExecuted || HLDoItExecuted, function () {return smalltalk.send(self, "_onDoneIt", []);}]);
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_codeWidget", []), "_announcer", []), "_on_do_", [smalltalk.HLDoItExecuted || HLDoItExecuted, function () {return smalltalk.send(self, "_onDoneIt", []);}]);
     return self;
 }
 }),
 smalltalk.HLInspector);
 
 smalltalk.addMethod(
-"_observeVariables",
+"_observeModel",
 smalltalk.method({
-selector: "observeVariables",
+selector: "observeModel",
 fn: function () {
     var self = this;
-    var $1, $2, $3, $4;
-    $1 = smalltalk.send(smalltalk.send(self, "_variables", []), "_announcer", []);
-    smalltalk.send($1, "_on_do_", [smalltalk.HLRefreshRequested || HLRefreshRequested, function (ann) {return smalltalk.send(self, "_onRefresh", []);}]);
-    smalltalk.send($1, "_on_do_", [smalltalk.HLDiveRequested || HLDiveRequested, function () {return smalltalk.send(self, "_onDive", []);}]);
-    $2 = smalltalk.send($1, "_yourself", []);
-    $3 = smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []);
-    smalltalk.send($3, "_on_do_", [smalltalk.HLInstanceVariableSelected || HLInstanceVariableSelected, function (ann) {return smalltalk.send(self, "_onInstanceVariableSelected", []);}]);
-    $4 = smalltalk.send($3, "_yourself", []);
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLInstanceVariableSelected || HLInstanceVariableSelected, function (ann) {return smalltalk.send(self, "_onInstanceVariableSelected", []);}]);
     return self;
 }
 }),
 smalltalk.HLInspector);
 
 smalltalk.addMethod(
-"_onDive",
+"_observeVariablesWidget",
 smalltalk.method({
-selector: "onDive",
+selector: "observeVariablesWidget",
 fn: function () {
     var self = this;
-    smalltalk.send(self, "_inspect_", [smalltalk.send(smalltalk.send(self, "_model", []), "_selectedInstVarObject", [])]);
+    var $1, $2;
+    $1 = smalltalk.send(smalltalk.send(self, "_variablesWidget", []), "_announcer", []);
+    smalltalk.send($1, "_on_do_", [smalltalk.HLRefreshRequested || HLRefreshRequested, function (ann) {return smalltalk.send(self, "_onRefresh", []);}]);
+    $2 = smalltalk.send($1, "_on_do_", [smalltalk.HLDiveRequested || HLDiveRequested, function () {return smalltalk.send(self, "_onDive", []);}]);
     return self;
 }
 }),
 smalltalk.HLInspector);
 
 smalltalk.addMethod(
-"_onDoIt",
+"_onDive",
 smalltalk.method({
-selector: "onDoIt",
+selector: "onDive",
 fn: function () {
     var self = this;
+    smalltalk.send(self, "_inspect_", [smalltalk.send(smalltalk.send(self, "_model", []), "_selectedInstVarObject", [])]);
     return self;
 }
 }),
@@ -342,8 +216,8 @@ smalltalk.method({
 selector: "onInstanceVariableSelected",
 fn: function () {
     var self = this;
-    smalltalk.send(smalltalk.send(self, "_code", []), "_receiver_", [smalltalk.send(smalltalk.send(self, "_model", []), "_selectedInstVarObject", [])]);
-    smalltalk.send(self, "_refreshDisplay", []);
+    smalltalk.send(smalltalk.send(self, "_codeWidget", []), "_receiver_", [smalltalk.send(smalltalk.send(self, "_model", []), "_selectedInstVarObject", [])]);
+    smalltalk.send(self, "_refreshDisplayWidget", []);
     return self;
 }
 }),
@@ -397,24 +271,24 @@ fn: function () {
 smalltalk.HLInspector);
 
 smalltalk.addMethod(
-"_refreshDisplay",
+"_refreshDisplayWidget",
 smalltalk.method({
-selector: "refreshDisplay",
+selector: "refreshDisplayWidget",
 fn: function () {
     var self = this;
-    smalltalk.send(smalltalk.send(self, "_display", []), "_refresh", []);
+    smalltalk.send(smalltalk.send(self, "_displayWidget", []), "_refresh", []);
     return self;
 }
 }),
 smalltalk.HLInspector);
 
 smalltalk.addMethod(
-"_refreshVariables",
+"_refreshVariablesWidget",
 smalltalk.method({
-selector: "refreshVariables",
+selector: "refreshVariablesWidget",
 fn: function () {
     var self = this;
-    smalltalk.send(smalltalk.send(self, "_variables", []), "_refresh", []);
+    smalltalk.send(smalltalk.send(self, "_variablesWidget", []), "_refresh", []);
     return self;
 }
 }),
@@ -426,8 +300,7 @@ smalltalk.method({
 selector: "renderContentOn:",
 fn: function (html) {
     var self = this;
-    smalltalk.send(self, "_ensureModel", []);
-    smalltalk.send(html, "_with_", [smalltalk.send(smalltalk.HLContainer || HLContainer, "_with_", [smalltalk.send(smalltalk.HLHorizontalSplitter || HLHorizontalSplitter, "_with_with_", [smalltalk.send(smalltalk.HLVerticalSplitter || HLVerticalSplitter, "_with_with_", [smalltalk.send(self, "_variables", []), smalltalk.send(self, "_display", [])]), smalltalk.send(self, "_code", [])])])]);
+    smalltalk.send(html, "_with_", [smalltalk.send(smalltalk.HLContainer || HLContainer, "_with_", [smalltalk.send(smalltalk.HLHorizontalSplitter || HLHorizontalSplitter, "_with_with_", [smalltalk.send(smalltalk.HLVerticalSplitter || HLVerticalSplitter, "_with_with_", [smalltalk.send(self, "_variablesWidget", []), smalltalk.send(self, "_displayWidget", [])]), smalltalk.send(self, "_codeWidget", [])])])]);
     return self;
 }
 }),
@@ -471,16 +344,22 @@ fn: function () {
 smalltalk.HLInspector);
 
 smalltalk.addMethod(
-"_variables",
+"_variablesWidget",
 smalltalk.method({
-selector: "variables",
+selector: "variablesWidget",
 fn: function () {
     var self = this;
-    var $1;
-    if (($receiver = self['@variables']) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_initializeVariables", []);
+    var $2, $3, $1;
+    if (($receiver = self['@variablesWidget']) == nil ||
+        $receiver == undefined) {
+        $2 = smalltalk.send(smalltalk.HLInspectorVariablesWidget ||
+            HLInspectorVariablesWidget, "_new", []);
+        smalltalk.send($2, "_model_", [smalltalk.send(self, "_model", [])]);
+        $3 = smalltalk.send($2, "_yourself", []);
+        self['@variablesWidget'] = $3;
+        $1 = self['@variablesWidget'];
     } else {
-        $1 = self['@variables'];
+        $1 = self['@variablesWidget'];
     }
     return $1;
 }
@@ -522,7 +401,7 @@ fn: function () {
 smalltalk.HLInspector.klass);
 
 
-smalltalk.addClass('HLInspectorDisplay', smalltalk.HLNavigationListWidget, ['model'], 'Helios-Inspector');
+smalltalk.addClass('HLInspectorDisplayWidget', smalltalk.HLNavigationListWidget, ['model'], 'Helios-Inspector');
 smalltalk.addMethod(
 "_model",
 smalltalk.method({
@@ -532,7 +411,7 @@ fn: function () {
     return self['@model'];
 }
 }),
-smalltalk.HLInspectorDisplay);
+smalltalk.HLInspectorDisplayWidget);
 
 smalltalk.addMethod(
 "_model_",
@@ -544,7 +423,7 @@ fn: function (aModel) {
     return self;
 }
 }),
-smalltalk.HLInspectorDisplay);
+smalltalk.HLInspectorDisplayWidget);
 
 smalltalk.addMethod(
 "_renderContentOn_",
@@ -556,7 +435,7 @@ fn: function (html) {
     return self;
 }
 }),
-smalltalk.HLInspectorDisplay);
+smalltalk.HLInspectorDisplayWidget);
 
 smalltalk.addMethod(
 "_selectionDisplayString",
@@ -576,7 +455,7 @@ fn: function () {
     return $1;
 }
 }),
-smalltalk.HLInspectorDisplay);
+smalltalk.HLInspectorDisplayWidget);
 
 
 
@@ -589,7 +468,8 @@ fn: function () {
     var self = this;
     var $1;
     if (($receiver = self['@announcer']) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_initializeAnnouncer", []);
+        self['@announcer'] = smalltalk.send(smalltalk.Announcer || Announcer, "_new", []);
+        $1 = self['@announcer'];
     } else {
         $1 = self['@announcer'];
     }
@@ -606,7 +486,8 @@ fn: function () {
     var self = this;
     var $1;
     if (($receiver = self['@code']) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_initializeCode", []);
+        self['@code'] = smalltalk.send(smalltalk.HLCodeModel || HLCodeModel, "_on_", [smalltalk.send(self, "_environment", [])]);
+        $1 = self['@code'];
     } else {
         $1 = self['@code'];
     }
@@ -644,48 +525,6 @@ fn: function (anEnvironment) {
 }),
 smalltalk.HLInspectorModel);
 
-smalltalk.addMethod(
-"_initializeAnnouncer",
-smalltalk.method({
-selector: "initializeAnnouncer",
-fn: function () {
-    var self = this;
-    var $1;
-    self['@announcer'] = smalltalk.send(smalltalk.Announcer || Announcer, "_new", []);
-    $1 = self['@announcer'];
-    return $1;
-}
-}),
-smalltalk.HLInspectorModel);
-
-smalltalk.addMethod(
-"_initializeCode",
-smalltalk.method({
-selector: "initializeCode",
-fn: function () {
-    var self = this;
-    var $1;
-    self['@code'] = smalltalk.send(smalltalk.HLCodeModel || HLCodeModel, "_on_", [smalltalk.send(self, "_environment", [])]);
-    $1 = self['@code'];
-    return $1;
-}
-}),
-smalltalk.HLInspectorModel);
-
-smalltalk.addMethod(
-"_initializeSelection",
-smalltalk.method({
-selector: "initializeSelection",
-fn: function () {
-    var self = this;
-    var $1;
-    self['@selection'] = "";
-    $1 = self['@selection'];
-    return $1;
-}
-}),
-smalltalk.HLInspectorModel);
-
 smalltalk.addMethod(
 "_inspect_on_",
 smalltalk.method({
@@ -797,7 +636,7 @@ fn: function () {
     var self = this;
     var $1;
     if (($receiver = self['@selection']) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_initializeSelection", []);
+        $1 = "";
     } else {
         $1 = self['@selection'];
     }
@@ -872,7 +711,7 @@ fn: function (anEnvironment) {
 smalltalk.HLInspectorModel.klass);
 
 
-smalltalk.addClass('HLInspectorVariables', smalltalk.HLNavigationListWidget, ['announcer', 'model', 'list', 'diveButton'], 'Helios-Inspector');
+smalltalk.addClass('HLInspectorVariablesWidget', smalltalk.HLNavigationListWidget, ['announcer', 'model', 'list', 'diveButton'], 'Helios-Inspector');
 smalltalk.addMethod(
 "_announcer",
 smalltalk.method({
@@ -881,42 +720,28 @@ fn: function () {
     var self = this;
     var $1;
     if (($receiver = self['@announcer']) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_initializeAnnouncer", []);
+        self['@announcer'] = smalltalk.send(smalltalk.Announcer || Announcer, "_new", []);
+        $1 = self['@announcer'];
     } else {
         $1 = self['@announcer'];
     }
     return $1;
 }
 }),
-smalltalk.HLInspectorVariables);
-
-smalltalk.addMethod(
-"_initializeAnnouncer",
-smalltalk.method({
-selector: "initializeAnnouncer",
-fn: function () {
-    var self = this;
-    var $1;
-    self['@announcer'] = smalltalk.send(smalltalk.Announcer || Announcer, "_new", []);
-    $1 = self['@announcer'];
-    return $1;
-}
-}),
-smalltalk.HLInspectorVariables);
+smalltalk.HLInspectorVariablesWidget);
 
 smalltalk.addMethod(
-"_initializeItems",
+"_defaultItems",
 smalltalk.method({
-selector: "initializeItems",
+selector: "defaultItems",
 fn: function () {
     var self = this;
     var $1;
-    self['@items'] = smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_variables", []), "_keys", []);
-    $1 = self['@items'];
+    $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_variables", []), "_keys", []);
     return $1;
 }
 }),
-smalltalk.HLInspectorVariables);
+smalltalk.HLInspectorVariablesWidget);
 
 smalltalk.addMethod(
 "_model",
@@ -927,7 +752,7 @@ fn: function () {
     return self['@model'];
 }
 }),
-smalltalk.HLInspectorVariables);
+smalltalk.HLInspectorVariablesWidget);
 
 smalltalk.addMethod(
 "_model_",
@@ -939,7 +764,7 @@ fn: function (aModel) {
     return self;
 }
 }),
-smalltalk.HLInspectorVariables);
+smalltalk.HLInspectorVariablesWidget);
 
 smalltalk.addMethod(
 "_refresh",
@@ -952,7 +777,7 @@ fn: function () {
     return self;
 }
 }),
-smalltalk.HLInspectorVariables);
+smalltalk.HLInspectorVariablesWidget);
 
 smalltalk.addMethod(
 "_renderButtonsOn_",
@@ -973,7 +798,7 @@ fn: function (html) {
     return self;
 }
 }),
-smalltalk.HLInspectorVariables);
+smalltalk.HLInspectorVariablesWidget);
 
 smalltalk.addMethod(
 "_resetItems",
@@ -985,7 +810,7 @@ fn: function () {
     return self;
 }
 }),
-smalltalk.HLInspectorVariables);
+smalltalk.HLInspectorVariablesWidget);
 
 smalltalk.addMethod(
 "_selectItem_",
@@ -998,7 +823,7 @@ fn: function (anObject) {
     return self;
 }
 }),
-smalltalk.HLInspectorVariables);
+smalltalk.HLInspectorVariablesWidget);
 
 smalltalk.addMethod(
 "_selection",
@@ -1011,7 +836,7 @@ fn: function () {
     return $1;
 }
 }),
-smalltalk.HLInspectorVariables);
+smalltalk.HLInspectorVariablesWidget);
 
 smalltalk.addMethod(
 "_variables",
@@ -1024,7 +849,7 @@ fn: function () {
     return $1;
 }
 }),
-smalltalk.HLInspectorVariables);
+smalltalk.HLInspectorVariablesWidget);
 
 
 

Dosya farkı çok büyük olduğundan ihmal edildi
+ 160 - 400
js/Helios-Inspector.js


+ 14 - 13
js/Helios-KeyBindings.deploy.js

@@ -472,19 +472,20 @@ smalltalk.addMethod(
 "_handleInactiveKeyDown_",
 smalltalk.method({
 selector: "handleInactiveKeyDown:",
-fn: function (event){
-var self=this;
-var $1,$2;
-$1=smalltalk.send(smalltalk.send(event,"_which",[]),"__eq",[smalltalk.send(self,"_activationKey",[])]);
-if(smalltalk.assert($1)){
-$2=smalltalk.send(event,"_ctrlKey",[]);
-if(smalltalk.assert($2)){
-smalltalk.send(self,"_activate",[]);
-smalltalk.send(event,"_preventDefault",[]);
-return false;
-};
-};
-return self}
+fn: function (event) {
+    var self = this;
+    var $1, $2;
+    $1 = smalltalk.send(smalltalk.send(event, "_which", []), "__eq", [smalltalk.send(self, "_activationKey", [])]);
+    if (smalltalk.assert($1)) {
+        $2 = smalltalk.send(event, "_ctrlKey", []);
+        if (smalltalk.assert($2)) {
+            smalltalk.send(self, "_activate", []);
+            smalltalk.send(event, "_preventDefault", []);
+            return false;
+        }
+    }
+    return self;
+}
 }),
 smalltalk.HLKeyBinder);
 

+ 14 - 13
js/Helios-KeyBindings.js

@@ -648,19 +648,20 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "handleInactiveKeyDown:",
 category: 'events',
-fn: function (event){
-var self=this;
-var $1,$2;
-$1=smalltalk.send(smalltalk.send(event,"_which",[]),"__eq",[smalltalk.send(self,"_activationKey",[])]);
-if(smalltalk.assert($1)){
-$2=smalltalk.send(event,"_ctrlKey",[]);
-if(smalltalk.assert($2)){
-smalltalk.send(self,"_activate",[]);
-smalltalk.send(event,"_preventDefault",[]);
-return false;
-};
-};
-return self},
+fn: function (event) {
+    var self = this;
+    var $1, $2;
+    $1 = smalltalk.send(smalltalk.send(event, "_which", []), "__eq", [smalltalk.send(self, "_activationKey", [])]);
+    if (smalltalk.assert($1)) {
+        $2 = smalltalk.send(event, "_ctrlKey", []);
+        if (smalltalk.assert($2)) {
+            smalltalk.send(self, "_activate", []);
+            smalltalk.send(event, "_preventDefault", []);
+            return false;
+        }
+    }
+    return self;
+},
 args: ["event"],
 source: "handleInactiveKeyDown: event\x0a      event which = self activationKey ifTrue: [\x0a      \x09\x09event ctrlKey  ifTrue: [\x0a\x09\x09\x09\x09\x09self activate. \x0a               \x09\x09 event preventDefault. \x0a                \x09^ false ] ]",
 messageSends: ["ifTrue:", "activate", "preventDefault", "ctrlKey", "=", "activationKey", "which"],

+ 161 - 169
js/Helios-Layout.deploy.js

@@ -4,16 +4,15 @@ smalltalk.addMethod(
 "_renderOn_",
 smalltalk.method({
 selector: "renderOn:",
-fn: function (html){
-var self=this;
-var $1,$2;
-$1=smalltalk.send(html,"_div",[]);
-smalltalk.send($1,"_id_",["container"]);
-$2=smalltalk.send($1,"_with_",[smalltalk.send(self,"_splitter",[])]);
-smalltalk.send(smalltalk.send(window,"_jQuery_",[window]),"_bind_do_",["resize",(function(){
-return smalltalk.send(smalltalk.send(self,"_splitter",[]),"_resize",[]);
-})]);
-return self}
+fn: function (html) {
+    var self = this;
+    var $1, $2;
+    $1 = smalltalk.send(html, "_div", []);
+    smalltalk.send($1, "_id_", ["container"]);
+    $2 = smalltalk.send($1, "_with_", [smalltalk.send(self, "_splitter", [])]);
+    smalltalk.send(smalltalk.send(window, "_jQuery_", [window]), "_bind_do_", ["resize", function () {return smalltalk.send(smalltalk.send(self, "_splitter", []), "_resize", []);}]);
+    return self;
+}
 }),
 smalltalk.HLContainer);
 
@@ -21,9 +20,9 @@ smalltalk.addMethod(
 "_splitter",
 smalltalk.method({
 selector: "splitter",
-fn: function (){
-var self=this;
-return self["@splitter"];
+fn: function () {
+    var self = this;
+    return self['@splitter'];
 }
 }),
 smalltalk.HLContainer);
@@ -32,10 +31,11 @@ smalltalk.addMethod(
 "_splitter_",
 smalltalk.method({
 selector: "splitter:",
-fn: function (aSplitter){
-var self=this;
-self["@splitter"]=aSplitter;
-return self}
+fn: function (aSplitter) {
+    var self = this;
+    self['@splitter'] = aSplitter;
+    return self;
+}
 }),
 smalltalk.HLContainer);
 
@@ -44,14 +44,14 @@ smalltalk.addMethod(
 "_with_",
 smalltalk.method({
 selector: "with:",
-fn: function (aSplitter){
-var self=this;
-var $2,$3,$1;
-$2=smalltalk.send(self,"_new",[]);
-smalltalk.send($2,"_splitter_",[aSplitter]);
-$3=smalltalk.send($2,"_yourself",[]);
-$1=$3;
-return $1;
+fn: function (aSplitter) {
+    var self = this;
+    var $2, $3, $1;
+    $2 = smalltalk.send(self, "_new", []);
+    smalltalk.send($2, "_splitter_", [aSplitter]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 }
 }),
 smalltalk.HLContainer.klass);
@@ -62,9 +62,9 @@ smalltalk.addMethod(
 "_cssClass",
 smalltalk.method({
 selector: "cssClass",
-fn: function (){
-var self=this;
-return "splitter";
+fn: function () {
+    var self = this;
+    return "splitter";
 }
 }),
 smalltalk.HLSplitter);
@@ -73,9 +73,9 @@ smalltalk.addMethod(
 "_firstWidget",
 smalltalk.method({
 selector: "firstWidget",
-fn: function (){
-var self=this;
-return self["@firstWidget"];
+fn: function () {
+    var self = this;
+    return self['@firstWidget'];
 }
 }),
 smalltalk.HLSplitter);
@@ -84,10 +84,11 @@ smalltalk.addMethod(
 "_firstWidget_",
 smalltalk.method({
 selector: "firstWidget:",
-fn: function (aWidget){
-var self=this;
-self["@firstWidget"]=aWidget;
-return self}
+fn: function (aWidget) {
+    var self = this;
+    self['@firstWidget'] = aWidget;
+    return self;
+}
 }),
 smalltalk.HLSplitter);
 
@@ -95,9 +96,9 @@ smalltalk.addMethod(
 "_isHeliosSplitter",
 smalltalk.method({
 selector: "isHeliosSplitter",
-fn: function (){
-var self=this;
-return true;
+fn: function () {
+    var self = this;
+    return true;
 }
 }),
 smalltalk.HLSplitter);
@@ -106,9 +107,9 @@ smalltalk.addMethod(
 "_panesCssClass",
 smalltalk.method({
 selector: "panesCssClass",
-fn: function (){
-var self=this;
-return "panes";
+fn: function () {
+    var self = this;
+    return "panes";
 }
 }),
 smalltalk.HLSplitter);
@@ -117,28 +118,16 @@ smalltalk.addMethod(
 "_renderOn_",
 smalltalk.method({
 selector: "renderOn:",
-fn: function (html){
-var self=this;
-var $1,$3,$4,$5,$6,$2,$7;
-$1=smalltalk.send(html,"_div",[]);
-smalltalk.send($1,"_class_",[smalltalk.send(self,"_panesCssClass",[])]);
-$2=smalltalk.send($1,"_with_",[(function(){
-$3=smalltalk.send(html,"_div",[]);
-smalltalk.send($3,"_class_",["pane"]);
-$4=smalltalk.send($3,"_with_",[smalltalk.send(self,"_firstWidget",[])]);
-self["@firstPane"]=$4;
-self["@firstPane"];
-self["@splitter"]=smalltalk.send(smalltalk.send(html,"_div",[]),"_class_",[smalltalk.send(self,"_cssClass",[])]);
-self["@splitter"];
-$5=smalltalk.send(html,"_div",[]);
-smalltalk.send($5,"_class_",["pane"]);
-$6=smalltalk.send($5,"_with_",[smalltalk.send(self,"_secondWidget",[])]);
-self["@secondPane"]=$6;
-return self["@secondPane"];
-})]);
-smalltalk.send(self,"_setupSplitter",[]);
-$7=smalltalk.send(self,"_resize",[]);
-return self}
+fn: function (html) {
+    var self = this;
+    var $1, $3, $4, $5, $6, $2, $7;
+    $1 = smalltalk.send(html, "_div", []);
+    smalltalk.send($1, "_class_", [smalltalk.send(self, "_panesCssClass", [])]);
+    $2 = smalltalk.send($1, "_with_", [function () {$3 = smalltalk.send(html, "_div", []);smalltalk.send($3, "_class_", ["pane"]);$4 = smalltalk.send($3, "_with_", [smalltalk.send(self, "_firstWidget", [])]);self['@firstPane'] = $4;self['@firstPane'];self['@splitter'] = smalltalk.send(smalltalk.send(html, "_div", []), "_class_", [smalltalk.send(self, "_cssClass", [])]);self['@splitter'];$5 = smalltalk.send(html, "_div", []);smalltalk.send($5, "_class_", ["pane"]);$6 = smalltalk.send($5, "_with_", [smalltalk.send(self, "_secondWidget", [])]);self['@secondPane'] = $6;return self['@secondPane'];}]);
+    smalltalk.send(self, "_setupSplitter", []);
+    $7 = smalltalk.send(self, "_resize", []);
+    return self;
+}
 }),
 smalltalk.HLSplitter);
 
@@ -146,18 +135,19 @@ smalltalk.addMethod(
 "_resize",
 smalltalk.method({
 selector: "resize",
-fn: function (){
-var self=this;
-var $1,$2;
-$1=smalltalk.send(smalltalk.send(self,"_firstWidget",[]),"_isHeliosSplitter",[]);
-if(smalltalk.assert($1)){
-smalltalk.send(smalltalk.send(self,"_firstWidget",[]),"_resize",[]);
-};
-$2=smalltalk.send(smalltalk.send(self,"_secondWidget",[]),"_isHeliosSplitter",[]);
-if(smalltalk.assert($2)){
-smalltalk.send(smalltalk.send(self,"_secondWidget",[]),"_resize",[]);
-};
-return self}
+fn: function () {
+    var self = this;
+    var $1, $2;
+    $1 = smalltalk.send(smalltalk.send(self, "_firstWidget", []), "_isHeliosSplitter", []);
+    if (smalltalk.assert($1)) {
+        smalltalk.send(smalltalk.send(self, "_firstWidget", []), "_resize", []);
+    }
+    $2 = smalltalk.send(smalltalk.send(self, "_secondWidget", []), "_isHeliosSplitter", []);
+    if (smalltalk.assert($2)) {
+        smalltalk.send(smalltalk.send(self, "_secondWidget", []), "_resize", []);
+    }
+    return self;
+}
 }),
 smalltalk.HLSplitter);
 
@@ -165,9 +155,9 @@ smalltalk.addMethod(
 "_secondWidget",
 smalltalk.method({
 selector: "secondWidget",
-fn: function (){
-var self=this;
-return self["@secondWidget"];
+fn: function () {
+    var self = this;
+    return self['@secondWidget'];
 }
 }),
 smalltalk.HLSplitter);
@@ -176,10 +166,11 @@ smalltalk.addMethod(
 "_secondWidget_",
 smalltalk.method({
 selector: "secondWidget:",
-fn: function (aWidget){
-var self=this;
-self["@secondWidget"]=aWidget;
-return self}
+fn: function (aWidget) {
+    var self = this;
+    self['@secondWidget'] = aWidget;
+    return self;
+}
 }),
 smalltalk.HLSplitter);
 
@@ -187,9 +178,10 @@ smalltalk.addMethod(
 "_setupSplitter",
 smalltalk.method({
 selector: "setupSplitter",
-fn: function (){
-var self=this;
-return self}
+fn: function () {
+    var self = this;
+    return self;
+}
 }),
 smalltalk.HLSplitter);
 
@@ -198,15 +190,15 @@ smalltalk.addMethod(
 "_with_with_",
 smalltalk.method({
 selector: "with:with:",
-fn: function (aWidget,anotherWidget){
-var self=this;
-var $2,$3,$1;
-$2=smalltalk.send(self,"_new",[]);
-smalltalk.send($2,"_firstWidget_",[aWidget]);
-smalltalk.send($2,"_secondWidget_",[anotherWidget]);
-$3=smalltalk.send($2,"_yourself",[]);
-$1=$3;
-return $1;
+fn: function (aWidget, anotherWidget) {
+    var self = this;
+    var $2, $3, $1;
+    $2 = smalltalk.send(self, "_new", []);
+    smalltalk.send($2, "_firstWidget_", [aWidget]);
+    smalltalk.send($2, "_secondWidget_", [anotherWidget]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 }
 }),
 smalltalk.HLSplitter.klass);
@@ -217,11 +209,11 @@ smalltalk.addMethod(
 "_cssClass",
 smalltalk.method({
 selector: "cssClass",
-fn: function (){
-var self=this;
-var $1;
-$1=smalltalk.send(smalltalk.send(self,"_cssClass",[],smalltalk.HLSplitter),"__comma",[" horizontal"]);
-return $1;
+fn: function () {
+    var self = this;
+    var $1;
+    $1 = smalltalk.send(smalltalk.send(self, "_cssClass", [], smalltalk.HLSplitter), "__comma", [" horizontal"]);
+    return $1;
 }
 }),
 smalltalk.HLHorizontalSplitter);
@@ -230,11 +222,11 @@ smalltalk.addMethod(
 "_panesCssClass",
 smalltalk.method({
 selector: "panesCssClass",
-fn: function (){
-var self=this;
-var $1;
-$1=smalltalk.send(smalltalk.send(self,"_panesCssClass",[],smalltalk.HLSplitter),"__comma",[" horizontal"]);
-return $1;
+fn: function () {
+    var self = this;
+    var $1;
+    $1 = smalltalk.send(smalltalk.send(self, "_panesCssClass", [], smalltalk.HLSplitter), "__comma", [" horizontal"]);
+    return $1;
 }
 }),
 smalltalk.HLHorizontalSplitter);
@@ -243,10 +235,11 @@ smalltalk.addMethod(
 "_resize",
 smalltalk.method({
 selector: "resize",
-fn: function (){
-var self=this;
-smalltalk.send(self,"_resize_",[smalltalk.send(smalltalk.send(smalltalk.send(self["@splitter"],"_asJQuery",[]),"_offset",[]),"_top",[])]);
-return self}
+fn: function () {
+    var self = this;
+    smalltalk.send(self, "_resize_", [smalltalk.send(smalltalk.send(smalltalk.send(self['@splitter'], "_asJQuery", []), "_offset", []), "_top", [])]);
+    return self;
+}
 }),
 smalltalk.HLHorizontalSplitter);
 
@@ -254,16 +247,17 @@ smalltalk.addMethod(
 "_resize_",
 smalltalk.method({
 selector: "resize:",
-fn: function (anInteger){
-var self=this;
-var container;
-var position;
-container=smalltalk.send(smalltalk.send(self["@firstPane"],"_asJQuery",[]),"_parent",[]);
-position=smalltalk.send(anInteger,"__minus",[smalltalk.send(smalltalk.send(container,"_offset",[]),"_top",[])]);
-smalltalk.send(smalltalk.send(self["@firstPane"],"_asJQuery",[]),"_height_",[smalltalk.send(smalltalk.send(position,"_min_",[smalltalk.send(smalltalk.send(container,"_height",[]),"__minus",[(100)])]),"_max_",[(100)])]);
-smalltalk.send(smalltalk.send(self["@secondPane"],"_asJQuery",[]),"_height_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(container,"_height",[]),"__minus",[position]),"_min_",[smalltalk.send(smalltalk.send(container,"_height",[]),"__minus",[(100)])]),"_max_",[(100)]),"__minus",[(6)])]);
-smalltalk.send(self,"_resize",[],smalltalk.HLSplitter);
-return self}
+fn: function (anInteger) {
+    var self = this;
+    var container;
+    var position;
+    container = smalltalk.send(smalltalk.send(self['@firstPane'], "_asJQuery", []), "_parent", []);
+    position = smalltalk.send(anInteger, "__minus", [smalltalk.send(smalltalk.send(container, "_offset", []), "_top", [])]);
+    smalltalk.send(smalltalk.send(self['@firstPane'], "_asJQuery", []), "_height_", [smalltalk.send(smalltalk.send(position, "_min_", [smalltalk.send(smalltalk.send(container, "_height", []), "__minus", [100])]), "_max_", [100])]);
+    smalltalk.send(smalltalk.send(self['@secondPane'], "_asJQuery", []), "_height_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(container, "_height", []), "__minus", [position]), "_min_", [smalltalk.send(smalltalk.send(container, "_height", []), "__minus", [100])]), "_max_", [100]), "__minus", [6])]);
+    smalltalk.send(self, "_resize", [], smalltalk.HLSplitter);
+    return self;
+}
 }),
 smalltalk.HLHorizontalSplitter);
 
@@ -271,14 +265,11 @@ smalltalk.addMethod(
 "_setupSplitter",
 smalltalk.method({
 selector: "setupSplitter",
-fn: function (){
-var self=this;
-smalltalk.send(smalltalk.send(self["@splitter"],"_asJQuery",[]),"_draggable_",[smalltalk.HashedCollection._fromPairs_([smalltalk.send("axis","__minus_gt",["y"]),smalltalk.send("containment","__minus_gt",[smalltalk.send(smalltalk.send(self["@splitter"],"_asJQuery",[]),"_parent",[])]),smalltalk.send("helper","__minus_gt",["clone"]),smalltalk.send("start","__minus_gt",[(function(e,ui){
-return smalltalk.send(self,"_startResizing_",[smalltalk.send(ui,"_helper",[])]);
-})]),smalltalk.send("drag","__minus_gt",[(function(e,ui){
-return smalltalk.send(self,"_resize_",[smalltalk.send(smalltalk.send(ui,"_offset",[]),"_top",[])]);
-})])])]);
-return self}
+fn: function () {
+    var self = this;
+    smalltalk.send(smalltalk.send(self['@splitter'], "_asJQuery", []), "_draggable_", [smalltalk.HashedCollection._fromPairs_([smalltalk.send("axis", "__minus_gt", ["y"]), smalltalk.send("containment", "__minus_gt", [smalltalk.send(smalltalk.send(self['@splitter'], "_asJQuery", []), "_parent", [])]), smalltalk.send("helper", "__minus_gt", ["clone"]), smalltalk.send("start", "__minus_gt", [function (e, ui) {return smalltalk.send(self, "_startResizing_", [smalltalk.send(ui, "_helper", [])]);}]), smalltalk.send("drag", "__minus_gt", [function (e, ui) {return smalltalk.send(self, "_resize_", [smalltalk.send(smalltalk.send(ui, "_offset", []), "_top", [])]);}])])]);
+    return self;
+}
 }),
 smalltalk.HLHorizontalSplitter);
 
@@ -286,10 +277,11 @@ smalltalk.addMethod(
 "_startResizing_",
 smalltalk.method({
 selector: "startResizing:",
-fn: function (aSplitter){
-var self=this;
-smalltalk.send(aSplitter,"_width_",[smalltalk.send(smalltalk.send(self["@splitter"],"_asJQuery",[]),"_width",[])]);
-return self}
+fn: function (aSplitter) {
+    var self = this;
+    smalltalk.send(aSplitter, "_width_", [smalltalk.send(smalltalk.send(self['@splitter'], "_asJQuery", []), "_width", [])]);
+    return self;
+}
 }),
 smalltalk.HLHorizontalSplitter);
 
@@ -300,11 +292,11 @@ smalltalk.addMethod(
 "_cssClass",
 smalltalk.method({
 selector: "cssClass",
-fn: function (){
-var self=this;
-var $1;
-$1=smalltalk.send(smalltalk.send(self,"_cssClass",[],smalltalk.HLSplitter),"__comma",[" vertical"]);
-return $1;
+fn: function () {
+    var self = this;
+    var $1;
+    $1 = smalltalk.send(smalltalk.send(self, "_cssClass", [], smalltalk.HLSplitter), "__comma", [" vertical"]);
+    return $1;
 }
 }),
 smalltalk.HLVerticalSplitter);
@@ -313,11 +305,11 @@ smalltalk.addMethod(
 "_panesCssClass",
 smalltalk.method({
 selector: "panesCssClass",
-fn: function (){
-var self=this;
-var $1;
-$1=smalltalk.send(smalltalk.send(self,"_panesCssClass",[],smalltalk.HLSplitter),"__comma",[" vertical"]);
-return $1;
+fn: function () {
+    var self = this;
+    var $1;
+    $1 = smalltalk.send(smalltalk.send(self, "_panesCssClass", [], smalltalk.HLSplitter), "__comma", [" vertical"]);
+    return $1;
 }
 }),
 smalltalk.HLVerticalSplitter);
@@ -326,10 +318,11 @@ smalltalk.addMethod(
 "_resize",
 smalltalk.method({
 selector: "resize",
-fn: function (){
-var self=this;
-smalltalk.send(self,"_resize_",[smalltalk.send(smalltalk.send(smalltalk.send(self["@splitter"],"_asJQuery",[]),"_offset",[]),"_left",[])]);
-return self}
+fn: function () {
+    var self = this;
+    smalltalk.send(self, "_resize_", [smalltalk.send(smalltalk.send(smalltalk.send(self['@splitter'], "_asJQuery", []), "_offset", []), "_left", [])]);
+    return self;
+}
 }),
 smalltalk.HLVerticalSplitter);
 
@@ -337,16 +330,17 @@ smalltalk.addMethod(
 "_resize_",
 smalltalk.method({
 selector: "resize:",
-fn: function (anInteger){
-var self=this;
-var container;
-var position;
-container=smalltalk.send(smalltalk.send(self["@firstPane"],"_asJQuery",[]),"_parent",[]);
-position=smalltalk.send(anInteger,"__minus",[smalltalk.send(smalltalk.send(container,"_offset",[]),"_left",[])]);
-smalltalk.send(smalltalk.send(self["@firstPane"],"_asJQuery",[]),"_width_",[smalltalk.send(smalltalk.send(position,"_min_",[smalltalk.send(smalltalk.send(container,"_width",[]),"__minus",[(100)])]),"_max_",[(100)])]);
-smalltalk.send(smalltalk.send(self["@secondPane"],"_asJQuery",[]),"_width_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(container,"_width",[]),"__minus",[position]),"_min_",[smalltalk.send(smalltalk.send(container,"_width",[]),"__minus",[(100)])]),"_max_",[(100)]),"__minus",[(6)])]);
-smalltalk.send(self,"_resize",[],smalltalk.HLSplitter);
-return self}
+fn: function (anInteger) {
+    var self = this;
+    var container;
+    var position;
+    container = smalltalk.send(smalltalk.send(self['@firstPane'], "_asJQuery", []), "_parent", []);
+    position = smalltalk.send(anInteger, "__minus", [smalltalk.send(smalltalk.send(container, "_offset", []), "_left", [])]);
+    smalltalk.send(smalltalk.send(self['@firstPane'], "_asJQuery", []), "_width_", [smalltalk.send(smalltalk.send(position, "_min_", [smalltalk.send(smalltalk.send(container, "_width", []), "__minus", [100])]), "_max_", [100])]);
+    smalltalk.send(smalltalk.send(self['@secondPane'], "_asJQuery", []), "_width_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(container, "_width", []), "__minus", [position]), "_min_", [smalltalk.send(smalltalk.send(container, "_width", []), "__minus", [100])]), "_max_", [100]), "__minus", [6])]);
+    smalltalk.send(self, "_resize", [], smalltalk.HLSplitter);
+    return self;
+}
 }),
 smalltalk.HLVerticalSplitter);
 
@@ -354,14 +348,11 @@ smalltalk.addMethod(
 "_setupSplitter",
 smalltalk.method({
 selector: "setupSplitter",
-fn: function (){
-var self=this;
-smalltalk.send(smalltalk.send(self["@splitter"],"_asJQuery",[]),"_draggable_",[smalltalk.HashedCollection._fromPairs_([smalltalk.send("axis","__minus_gt",["x"]),smalltalk.send("containment","__minus_gt",[smalltalk.send(smalltalk.send(self["@splitter"],"_asJQuery",[]),"_parent",[])]),smalltalk.send("helper","__minus_gt",["clone"]),smalltalk.send("start","__minus_gt",[(function(e,ui){
-return smalltalk.send(self,"_startResizing_",[smalltalk.send(ui,"_helper",[])]);
-})]),smalltalk.send("drag","__minus_gt",[(function(e,ui){
-return smalltalk.send(self,"_resize_",[smalltalk.send(smalltalk.send(ui,"_offset",[]),"_left",[])]);
-})])])]);
-return self}
+fn: function () {
+    var self = this;
+    smalltalk.send(smalltalk.send(self['@splitter'], "_asJQuery", []), "_draggable_", [smalltalk.HashedCollection._fromPairs_([smalltalk.send("axis", "__minus_gt", ["x"]), smalltalk.send("containment", "__minus_gt", [smalltalk.send(smalltalk.send(self['@splitter'], "_asJQuery", []), "_parent", [])]), smalltalk.send("helper", "__minus_gt", ["clone"]), smalltalk.send("start", "__minus_gt", [function (e, ui) {return smalltalk.send(self, "_startResizing_", [smalltalk.send(ui, "_helper", [])]);}]), smalltalk.send("drag", "__minus_gt", [function (e, ui) {return smalltalk.send(self, "_resize_", [smalltalk.send(smalltalk.send(ui, "_offset", []), "_left", [])]);}])])]);
+    return self;
+}
 }),
 smalltalk.HLVerticalSplitter);
 
@@ -369,10 +360,11 @@ smalltalk.addMethod(
 "_startResizing_",
 smalltalk.method({
 selector: "startResizing:",
-fn: function (aSplitter){
-var self=this;
-smalltalk.send(aSplitter,"_height_",[smalltalk.send(smalltalk.send(self["@splitter"],"_asJQuery",[]),"_height",[])]);
-return self}
+fn: function (aSplitter) {
+    var self = this;
+    smalltalk.send(aSplitter, "_height_", [smalltalk.send(smalltalk.send(self['@splitter'], "_asJQuery", []), "_height", [])]);
+    return self;
+}
 }),
 smalltalk.HLVerticalSplitter);
 
@@ -382,9 +374,9 @@ smalltalk.addMethod(
 "_isHeliosSplitter",
 smalltalk.method({
 selector: "isHeliosSplitter",
-fn: function (){
-var self=this;
-return false;
+fn: function () {
+    var self = this;
+    return false;
 }
 }),
 smalltalk.Object);

+ 161 - 169
js/Helios-Layout.js

@@ -5,16 +5,15 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "renderOn:",
 category: 'rendering',
-fn: function (html){
-var self=this;
-var $1,$2;
-$1=smalltalk.send(html,"_div",[]);
-smalltalk.send($1,"_id_",["container"]);
-$2=smalltalk.send($1,"_with_",[smalltalk.send(self,"_splitter",[])]);
-smalltalk.send(smalltalk.send(window,"_jQuery_",[window]),"_bind_do_",["resize",(function(){
-return smalltalk.send(smalltalk.send(self,"_splitter",[]),"_resize",[]);
-})]);
-return self},
+fn: function (html) {
+    var self = this;
+    var $1, $2;
+    $1 = smalltalk.send(html, "_div", []);
+    smalltalk.send($1, "_id_", ["container"]);
+    $2 = smalltalk.send($1, "_with_", [smalltalk.send(self, "_splitter", [])]);
+    smalltalk.send(smalltalk.send(window, "_jQuery_", [window]), "_bind_do_", ["resize", function () {return smalltalk.send(smalltalk.send(self, "_splitter", []), "_resize", []);}]);
+    return self;
+},
 args: ["html"],
 source: "renderOn: html\x0a\x09html div \x0a    \x09id: 'container'; \x0a        with: self splitter.\x0a        \x0a   (window jQuery: window) bind: 'resize' do: [ self splitter resize ]",
 messageSends: ["id:", "div", "with:", "splitter", "bind:do:", "resize", "jQuery:"],
@@ -27,9 +26,9 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "splitter",
 category: 'accessing',
-fn: function (){
-var self=this;
-return self["@splitter"];
+fn: function () {
+    var self = this;
+    return self['@splitter'];
 },
 args: [],
 source: "splitter\x0a\x09^ splitter",
@@ -43,10 +42,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "splitter:",
 category: 'accessing',
-fn: function (aSplitter){
-var self=this;
-self["@splitter"]=aSplitter;
-return self},
+fn: function (aSplitter) {
+    var self = this;
+    self['@splitter'] = aSplitter;
+    return self;
+},
 args: ["aSplitter"],
 source: "splitter: aSplitter\x0a\x09splitter := aSplitter",
 messageSends: [],
@@ -60,14 +60,14 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "with:",
 category: 'instance creation',
-fn: function (aSplitter){
-var self=this;
-var $2,$3,$1;
-$2=smalltalk.send(self,"_new",[]);
-smalltalk.send($2,"_splitter_",[aSplitter]);
-$3=smalltalk.send($2,"_yourself",[]);
-$1=$3;
-return $1;
+fn: function (aSplitter) {
+    var self = this;
+    var $2, $3, $1;
+    $2 = smalltalk.send(self, "_new", []);
+    smalltalk.send($2, "_splitter_", [aSplitter]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 },
 args: ["aSplitter"],
 source: "with: aSplitter\x0a\x09^ self new \x0a    \x09splitter: aSplitter; \x0a        yourself",
@@ -83,9 +83,9 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "cssClass",
 category: 'accessing',
-fn: function (){
-var self=this;
-return "splitter";
+fn: function () {
+    var self = this;
+    return "splitter";
 },
 args: [],
 source: "cssClass\x0a\x09^ 'splitter'",
@@ -99,9 +99,9 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "firstWidget",
 category: 'accessing',
-fn: function (){
-var self=this;
-return self["@firstWidget"];
+fn: function () {
+    var self = this;
+    return self['@firstWidget'];
 },
 args: [],
 source: "firstWidget\x0a\x09^ firstWidget",
@@ -115,10 +115,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "firstWidget:",
 category: 'accessing',
-fn: function (aWidget){
-var self=this;
-self["@firstWidget"]=aWidget;
-return self},
+fn: function (aWidget) {
+    var self = this;
+    self['@firstWidget'] = aWidget;
+    return self;
+},
 args: ["aWidget"],
 source: "firstWidget: aWidget\x0a\x09firstWidget := aWidget",
 messageSends: [],
@@ -131,9 +132,9 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "isHeliosSplitter",
 category: 'testing',
-fn: function (){
-var self=this;
-return true;
+fn: function () {
+    var self = this;
+    return true;
 },
 args: [],
 source: "isHeliosSplitter\x0a\x09^ true",
@@ -147,9 +148,9 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "panesCssClass",
 category: 'rendering',
-fn: function (){
-var self=this;
-return "panes";
+fn: function () {
+    var self = this;
+    return "panes";
 },
 args: [],
 source: "panesCssClass\x0a\x09^ 'panes'",
@@ -163,28 +164,16 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "renderOn:",
 category: 'rendering',
-fn: function (html){
-var self=this;
-var $1,$3,$4,$5,$6,$2,$7;
-$1=smalltalk.send(html,"_div",[]);
-smalltalk.send($1,"_class_",[smalltalk.send(self,"_panesCssClass",[])]);
-$2=smalltalk.send($1,"_with_",[(function(){
-$3=smalltalk.send(html,"_div",[]);
-smalltalk.send($3,"_class_",["pane"]);
-$4=smalltalk.send($3,"_with_",[smalltalk.send(self,"_firstWidget",[])]);
-self["@firstPane"]=$4;
-self["@firstPane"];
-self["@splitter"]=smalltalk.send(smalltalk.send(html,"_div",[]),"_class_",[smalltalk.send(self,"_cssClass",[])]);
-self["@splitter"];
-$5=smalltalk.send(html,"_div",[]);
-smalltalk.send($5,"_class_",["pane"]);
-$6=smalltalk.send($5,"_with_",[smalltalk.send(self,"_secondWidget",[])]);
-self["@secondPane"]=$6;
-return self["@secondPane"];
-})]);
-smalltalk.send(self,"_setupSplitter",[]);
-$7=smalltalk.send(self,"_resize",[]);
-return self},
+fn: function (html) {
+    var self = this;
+    var $1, $3, $4, $5, $6, $2, $7;
+    $1 = smalltalk.send(html, "_div", []);
+    smalltalk.send($1, "_class_", [smalltalk.send(self, "_panesCssClass", [])]);
+    $2 = smalltalk.send($1, "_with_", [function () {$3 = smalltalk.send(html, "_div", []);smalltalk.send($3, "_class_", ["pane"]);$4 = smalltalk.send($3, "_with_", [smalltalk.send(self, "_firstWidget", [])]);self['@firstPane'] = $4;self['@firstPane'];self['@splitter'] = smalltalk.send(smalltalk.send(html, "_div", []), "_class_", [smalltalk.send(self, "_cssClass", [])]);self['@splitter'];$5 = smalltalk.send(html, "_div", []);smalltalk.send($5, "_class_", ["pane"]);$6 = smalltalk.send($5, "_with_", [smalltalk.send(self, "_secondWidget", [])]);self['@secondPane'] = $6;return self['@secondPane'];}]);
+    smalltalk.send(self, "_setupSplitter", []);
+    $7 = smalltalk.send(self, "_resize", []);
+    return self;
+},
 args: ["html"],
 source: "renderOn: html\x0a\x09html div class: self panesCssClass; with: [\x0a\x09\x09firstPane := html div class: 'pane'; with: self firstWidget.\x0a    \x09splitter := html div class: self cssClass.\x0a    \x09secondPane := html div class: 'pane'; with: self secondWidget ].\x0a        \x0a\x09self \x0a    \x09setupSplitter;\x0a        resize",
 messageSends: ["class:", "panesCssClass", "div", "with:", "firstWidget", "cssClass", "secondWidget", "setupSplitter", "resize"],
@@ -197,18 +186,19 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "resize",
 category: 'rendering',
-fn: function (){
-var self=this;
-var $1,$2;
-$1=smalltalk.send(smalltalk.send(self,"_firstWidget",[]),"_isHeliosSplitter",[]);
-if(smalltalk.assert($1)){
-smalltalk.send(smalltalk.send(self,"_firstWidget",[]),"_resize",[]);
-};
-$2=smalltalk.send(smalltalk.send(self,"_secondWidget",[]),"_isHeliosSplitter",[]);
-if(smalltalk.assert($2)){
-smalltalk.send(smalltalk.send(self,"_secondWidget",[]),"_resize",[]);
-};
-return self},
+fn: function () {
+    var self = this;
+    var $1, $2;
+    $1 = smalltalk.send(smalltalk.send(self, "_firstWidget", []), "_isHeliosSplitter", []);
+    if (smalltalk.assert($1)) {
+        smalltalk.send(smalltalk.send(self, "_firstWidget", []), "_resize", []);
+    }
+    $2 = smalltalk.send(smalltalk.send(self, "_secondWidget", []), "_isHeliosSplitter", []);
+    if (smalltalk.assert($2)) {
+        smalltalk.send(smalltalk.send(self, "_secondWidget", []), "_resize", []);
+    }
+    return self;
+},
 args: [],
 source: "resize\x0a\x09self firstWidget isHeliosSplitter ifTrue: [ self firstWidget resize ].\x0a    self secondWidget isHeliosSplitter ifTrue: [ self secondWidget resize ]",
 messageSends: ["ifTrue:", "resize", "firstWidget", "isHeliosSplitter", "secondWidget"],
@@ -221,9 +211,9 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "secondWidget",
 category: 'accessing',
-fn: function (){
-var self=this;
-return self["@secondWidget"];
+fn: function () {
+    var self = this;
+    return self['@secondWidget'];
 },
 args: [],
 source: "secondWidget\x0a\x09^ secondWidget",
@@ -237,10 +227,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "secondWidget:",
 category: 'accessing',
-fn: function (aWidget){
-var self=this;
-self["@secondWidget"]=aWidget;
-return self},
+fn: function (aWidget) {
+    var self = this;
+    self['@secondWidget'] = aWidget;
+    return self;
+},
 args: ["aWidget"],
 source: "secondWidget: aWidget\x0a\x09secondWidget := aWidget",
 messageSends: [],
@@ -253,9 +244,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "setupSplitter",
 category: 'rendering',
-fn: function (){
-var self=this;
-return self},
+fn: function () {
+    var self = this;
+    return self;
+},
 args: [],
 source: "setupSplitter",
 messageSends: [],
@@ -269,15 +261,15 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "with:with:",
 category: 'instance creation',
-fn: function (aWidget,anotherWidget){
-var self=this;
-var $2,$3,$1;
-$2=smalltalk.send(self,"_new",[]);
-smalltalk.send($2,"_firstWidget_",[aWidget]);
-smalltalk.send($2,"_secondWidget_",[anotherWidget]);
-$3=smalltalk.send($2,"_yourself",[]);
-$1=$3;
-return $1;
+fn: function (aWidget, anotherWidget) {
+    var self = this;
+    var $2, $3, $1;
+    $2 = smalltalk.send(self, "_new", []);
+    smalltalk.send($2, "_firstWidget_", [aWidget]);
+    smalltalk.send($2, "_secondWidget_", [anotherWidget]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 },
 args: ["aWidget", "anotherWidget"],
 source: "with: aWidget with: anotherWidget\x0a\x09^ self new\x0a    \x09\x09firstWidget: aWidget;\x0a            secondWidget: anotherWidget;\x0a            yourself",
@@ -293,11 +285,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "cssClass",
 category: 'accessing',
-fn: function (){
-var self=this;
-var $1;
-$1=smalltalk.send(smalltalk.send(self,"_cssClass",[],smalltalk.HLSplitter),"__comma",[" horizontal"]);
-return $1;
+fn: function () {
+    var self = this;
+    var $1;
+    $1 = smalltalk.send(smalltalk.send(self, "_cssClass", [], smalltalk.HLSplitter), "__comma", [" horizontal"]);
+    return $1;
 },
 args: [],
 source: "cssClass\x0a\x09^ super cssClass, ' horizontal'",
@@ -311,11 +303,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "panesCssClass",
 category: 'accessing',
-fn: function (){
-var self=this;
-var $1;
-$1=smalltalk.send(smalltalk.send(self,"_panesCssClass",[],smalltalk.HLSplitter),"__comma",[" horizontal"]);
-return $1;
+fn: function () {
+    var self = this;
+    var $1;
+    $1 = smalltalk.send(smalltalk.send(self, "_panesCssClass", [], smalltalk.HLSplitter), "__comma", [" horizontal"]);
+    return $1;
 },
 args: [],
 source: "panesCssClass\x0a\x09^ super panesCssClass, ' horizontal'",
@@ -329,10 +321,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "resize",
 category: 'actions',
-fn: function (){
-var self=this;
-smalltalk.send(self,"_resize_",[smalltalk.send(smalltalk.send(smalltalk.send(self["@splitter"],"_asJQuery",[]),"_offset",[]),"_top",[])]);
-return self},
+fn: function () {
+    var self = this;
+    smalltalk.send(self, "_resize_", [smalltalk.send(smalltalk.send(smalltalk.send(self['@splitter'], "_asJQuery", []), "_offset", []), "_top", [])]);
+    return self;
+},
 args: [],
 source: "resize\x0a\x09self resize: splitter asJQuery offset top",
 messageSends: ["resize:", "top", "offset", "asJQuery"],
@@ -345,16 +338,17 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "resize:",
 category: 'actions',
-fn: function (anInteger){
-var self=this;
-var container;
-var position;
-container=smalltalk.send(smalltalk.send(self["@firstPane"],"_asJQuery",[]),"_parent",[]);
-position=smalltalk.send(anInteger,"__minus",[smalltalk.send(smalltalk.send(container,"_offset",[]),"_top",[])]);
-smalltalk.send(smalltalk.send(self["@firstPane"],"_asJQuery",[]),"_height_",[smalltalk.send(smalltalk.send(position,"_min_",[smalltalk.send(smalltalk.send(container,"_height",[]),"__minus",[(100)])]),"_max_",[(100)])]);
-smalltalk.send(smalltalk.send(self["@secondPane"],"_asJQuery",[]),"_height_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(container,"_height",[]),"__minus",[position]),"_min_",[smalltalk.send(smalltalk.send(container,"_height",[]),"__minus",[(100)])]),"_max_",[(100)]),"__minus",[(6)])]);
-smalltalk.send(self,"_resize",[],smalltalk.HLSplitter);
-return self},
+fn: function (anInteger) {
+    var self = this;
+    var container;
+    var position;
+    container = smalltalk.send(smalltalk.send(self['@firstPane'], "_asJQuery", []), "_parent", []);
+    position = smalltalk.send(anInteger, "__minus", [smalltalk.send(smalltalk.send(container, "_offset", []), "_top", [])]);
+    smalltalk.send(smalltalk.send(self['@firstPane'], "_asJQuery", []), "_height_", [smalltalk.send(smalltalk.send(position, "_min_", [smalltalk.send(smalltalk.send(container, "_height", []), "__minus", [100])]), "_max_", [100])]);
+    smalltalk.send(smalltalk.send(self['@secondPane'], "_asJQuery", []), "_height_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(container, "_height", []), "__minus", [position]), "_min_", [smalltalk.send(smalltalk.send(container, "_height", []), "__minus", [100])]), "_max_", [100]), "__minus", [6])]);
+    smalltalk.send(self, "_resize", [], smalltalk.HLSplitter);
+    return self;
+},
 args: ["anInteger"],
 source: "resize: anInteger\x0a\x09| container position |\x0a    \x0a    container := firstPane asJQuery parent.\x0a    position := anInteger - container offset top.\x0a    \x0a\x09firstPane asJQuery height: ((position min: container height - 100) max: 100).\x0a    secondPane asJQuery height: (((container height - position) min: container height - 100) max: 100) - 6.\x0a    \x0a    super resize",
 messageSends: ["parent", "asJQuery", "-", "top", "offset", "height:", "max:", "min:", "height", "resize"],
@@ -367,14 +361,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "setupSplitter",
 category: 'rendering',
-fn: function (){
-var self=this;
-smalltalk.send(smalltalk.send(self["@splitter"],"_asJQuery",[]),"_draggable_",[smalltalk.HashedCollection._fromPairs_([smalltalk.send("axis","__minus_gt",["y"]),smalltalk.send("containment","__minus_gt",[smalltalk.send(smalltalk.send(self["@splitter"],"_asJQuery",[]),"_parent",[])]),smalltalk.send("helper","__minus_gt",["clone"]),smalltalk.send("start","__minus_gt",[(function(e,ui){
-return smalltalk.send(self,"_startResizing_",[smalltalk.send(ui,"_helper",[])]);
-})]),smalltalk.send("drag","__minus_gt",[(function(e,ui){
-return smalltalk.send(self,"_resize_",[smalltalk.send(smalltalk.send(ui,"_offset",[]),"_top",[])]);
-})])])]);
-return self},
+fn: function () {
+    var self = this;
+    smalltalk.send(smalltalk.send(self['@splitter'], "_asJQuery", []), "_draggable_", [smalltalk.HashedCollection._fromPairs_([smalltalk.send("axis", "__minus_gt", ["y"]), smalltalk.send("containment", "__minus_gt", [smalltalk.send(smalltalk.send(self['@splitter'], "_asJQuery", []), "_parent", [])]), smalltalk.send("helper", "__minus_gt", ["clone"]), smalltalk.send("start", "__minus_gt", [function (e, ui) {return smalltalk.send(self, "_startResizing_", [smalltalk.send(ui, "_helper", [])]);}]), smalltalk.send("drag", "__minus_gt", [function (e, ui) {return smalltalk.send(self, "_resize_", [smalltalk.send(smalltalk.send(ui, "_offset", []), "_top", [])]);}])])]);
+    return self;
+},
 args: [],
 source: "setupSplitter\x0a\x09splitter asJQuery draggable: #{ \x0a    \x09'axis' -> 'y'. \x0a        'containment' -> splitter asJQuery parent.\x0a        'helper' -> 'clone'.\x0a        'start' -> [ :e :ui | self startResizing: ui helper ].\x0a        'drag' -> [ :e :ui | self resize: ui offset top ] }",
 messageSends: ["draggable:", "->", "parent", "asJQuery", "startResizing:", "helper", "resize:", "top", "offset"],
@@ -387,10 +378,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "startResizing:",
 category: 'actions',
-fn: function (aSplitter){
-var self=this;
-smalltalk.send(aSplitter,"_width_",[smalltalk.send(smalltalk.send(self["@splitter"],"_asJQuery",[]),"_width",[])]);
-return self},
+fn: function (aSplitter) {
+    var self = this;
+    smalltalk.send(aSplitter, "_width_", [smalltalk.send(smalltalk.send(self['@splitter'], "_asJQuery", []), "_width", [])]);
+    return self;
+},
 args: ["aSplitter"],
 source: "startResizing: aSplitter\x0a\x09aSplitter width: splitter asJQuery width",
 messageSends: ["width:", "width", "asJQuery"],
@@ -406,11 +398,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "cssClass",
 category: 'accessing',
-fn: function (){
-var self=this;
-var $1;
-$1=smalltalk.send(smalltalk.send(self,"_cssClass",[],smalltalk.HLSplitter),"__comma",[" vertical"]);
-return $1;
+fn: function () {
+    var self = this;
+    var $1;
+    $1 = smalltalk.send(smalltalk.send(self, "_cssClass", [], smalltalk.HLSplitter), "__comma", [" vertical"]);
+    return $1;
 },
 args: [],
 source: "cssClass\x0a\x09^ super cssClass, ' vertical'",
@@ -424,11 +416,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "panesCssClass",
 category: 'accessing',
-fn: function (){
-var self=this;
-var $1;
-$1=smalltalk.send(smalltalk.send(self,"_panesCssClass",[],smalltalk.HLSplitter),"__comma",[" vertical"]);
-return $1;
+fn: function () {
+    var self = this;
+    var $1;
+    $1 = smalltalk.send(smalltalk.send(self, "_panesCssClass", [], smalltalk.HLSplitter), "__comma", [" vertical"]);
+    return $1;
 },
 args: [],
 source: "panesCssClass\x0a\x09^ super panesCssClass, ' vertical'",
@@ -442,10 +434,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "resize",
 category: 'actions',
-fn: function (){
-var self=this;
-smalltalk.send(self,"_resize_",[smalltalk.send(smalltalk.send(smalltalk.send(self["@splitter"],"_asJQuery",[]),"_offset",[]),"_left",[])]);
-return self},
+fn: function () {
+    var self = this;
+    smalltalk.send(self, "_resize_", [smalltalk.send(smalltalk.send(smalltalk.send(self['@splitter'], "_asJQuery", []), "_offset", []), "_left", [])]);
+    return self;
+},
 args: [],
 source: "resize\x0a\x09self resize: splitter asJQuery offset left",
 messageSends: ["resize:", "left", "offset", "asJQuery"],
@@ -458,16 +451,17 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "resize:",
 category: 'actions',
-fn: function (anInteger){
-var self=this;
-var container;
-var position;
-container=smalltalk.send(smalltalk.send(self["@firstPane"],"_asJQuery",[]),"_parent",[]);
-position=smalltalk.send(anInteger,"__minus",[smalltalk.send(smalltalk.send(container,"_offset",[]),"_left",[])]);
-smalltalk.send(smalltalk.send(self["@firstPane"],"_asJQuery",[]),"_width_",[smalltalk.send(smalltalk.send(position,"_min_",[smalltalk.send(smalltalk.send(container,"_width",[]),"__minus",[(100)])]),"_max_",[(100)])]);
-smalltalk.send(smalltalk.send(self["@secondPane"],"_asJQuery",[]),"_width_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(container,"_width",[]),"__minus",[position]),"_min_",[smalltalk.send(smalltalk.send(container,"_width",[]),"__minus",[(100)])]),"_max_",[(100)]),"__minus",[(6)])]);
-smalltalk.send(self,"_resize",[],smalltalk.HLSplitter);
-return self},
+fn: function (anInteger) {
+    var self = this;
+    var container;
+    var position;
+    container = smalltalk.send(smalltalk.send(self['@firstPane'], "_asJQuery", []), "_parent", []);
+    position = smalltalk.send(anInteger, "__minus", [smalltalk.send(smalltalk.send(container, "_offset", []), "_left", [])]);
+    smalltalk.send(smalltalk.send(self['@firstPane'], "_asJQuery", []), "_width_", [smalltalk.send(smalltalk.send(position, "_min_", [smalltalk.send(smalltalk.send(container, "_width", []), "__minus", [100])]), "_max_", [100])]);
+    smalltalk.send(smalltalk.send(self['@secondPane'], "_asJQuery", []), "_width_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(container, "_width", []), "__minus", [position]), "_min_", [smalltalk.send(smalltalk.send(container, "_width", []), "__minus", [100])]), "_max_", [100]), "__minus", [6])]);
+    smalltalk.send(self, "_resize", [], smalltalk.HLSplitter);
+    return self;
+},
 args: ["anInteger"],
 source: "resize: anInteger\x0a\x09| container position |\x0a    \x0a    container := firstPane asJQuery parent.\x0a    position := anInteger - container offset left.\x0a    \x0a\x09firstPane asJQuery width: ((position min: container width - 100) max: 100).\x0a    secondPane asJQuery width: (((container width - position) min: container width - 100) max: 100) - 6.\x0a    \x0a    super resize",
 messageSends: ["parent", "asJQuery", "-", "left", "offset", "width:", "max:", "min:", "width", "resize"],
@@ -480,14 +474,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "setupSplitter",
 category: 'rendering',
-fn: function (){
-var self=this;
-smalltalk.send(smalltalk.send(self["@splitter"],"_asJQuery",[]),"_draggable_",[smalltalk.HashedCollection._fromPairs_([smalltalk.send("axis","__minus_gt",["x"]),smalltalk.send("containment","__minus_gt",[smalltalk.send(smalltalk.send(self["@splitter"],"_asJQuery",[]),"_parent",[])]),smalltalk.send("helper","__minus_gt",["clone"]),smalltalk.send("start","__minus_gt",[(function(e,ui){
-return smalltalk.send(self,"_startResizing_",[smalltalk.send(ui,"_helper",[])]);
-})]),smalltalk.send("drag","__minus_gt",[(function(e,ui){
-return smalltalk.send(self,"_resize_",[smalltalk.send(smalltalk.send(ui,"_offset",[]),"_left",[])]);
-})])])]);
-return self},
+fn: function () {
+    var self = this;
+    smalltalk.send(smalltalk.send(self['@splitter'], "_asJQuery", []), "_draggable_", [smalltalk.HashedCollection._fromPairs_([smalltalk.send("axis", "__minus_gt", ["x"]), smalltalk.send("containment", "__minus_gt", [smalltalk.send(smalltalk.send(self['@splitter'], "_asJQuery", []), "_parent", [])]), smalltalk.send("helper", "__minus_gt", ["clone"]), smalltalk.send("start", "__minus_gt", [function (e, ui) {return smalltalk.send(self, "_startResizing_", [smalltalk.send(ui, "_helper", [])]);}]), smalltalk.send("drag", "__minus_gt", [function (e, ui) {return smalltalk.send(self, "_resize_", [smalltalk.send(smalltalk.send(ui, "_offset", []), "_left", [])]);}])])]);
+    return self;
+},
 args: [],
 source: "setupSplitter\x0a\x09splitter asJQuery draggable: #{ \x0a    \x09'axis' -> 'x'. \x0a        'containment' -> splitter asJQuery parent.\x0a        'helper' -> 'clone'.\x0a        'start' -> [ :e :ui | self startResizing: ui helper ].\x0a        'drag' -> [ :e :ui | self resize: ui offset left ] }",
 messageSends: ["draggable:", "->", "parent", "asJQuery", "startResizing:", "helper", "resize:", "left", "offset"],
@@ -500,10 +491,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "startResizing:",
 category: 'actions',
-fn: function (aSplitter){
-var self=this;
-smalltalk.send(aSplitter,"_height_",[smalltalk.send(smalltalk.send(self["@splitter"],"_asJQuery",[]),"_height",[])]);
-return self},
+fn: function (aSplitter) {
+    var self = this;
+    smalltalk.send(aSplitter, "_height_", [smalltalk.send(smalltalk.send(self['@splitter'], "_asJQuery", []), "_height", [])]);
+    return self;
+},
 args: ["aSplitter"],
 source: "startResizing: aSplitter\x0a\x09aSplitter height: splitter asJQuery height",
 messageSends: ["height:", "height", "asJQuery"],
@@ -518,9 +510,9 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "isHeliosSplitter",
 category: '*Helios-Layout',
-fn: function (){
-var self=this;
-return false;
+fn: function () {
+    var self = this;
+    return false;
 },
 args: [],
 source: "isHeliosSplitter\x0a\x09^ false",

+ 95 - 162
js/Helios-Workspace.deploy.js

@@ -8,7 +8,8 @@ fn: function () {
     var self = this;
     var $1;
     if (($receiver = self['@announcer']) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_initializeAnnouncer", []);
+        self['@announcer'] = smalltalk.send(smalltalk.Announcer || Announcer, "_new", []);
+        $1 = self['@announcer'];
     } else {
         $1 = self['@announcer'];
     }
@@ -17,6 +18,19 @@ fn: function () {
 }),
 smalltalk.HLCodeModel);
 
+smalltalk.addMethod(
+"_defaultReceiver",
+smalltalk.method({
+selector: "defaultReceiver",
+fn: function () {
+    var self = this;
+    var $1;
+    $1 = smalltalk.send(smalltalk.DoIt || DoIt, "_new", []);
+    return $1;
+}
+}),
+smalltalk.HLCodeModel);
+
 smalltalk.addMethod(
 "_doIt_",
 smalltalk.method({
@@ -38,7 +52,7 @@ fn: function () {
     var self = this;
     var $1;
     if (($receiver = self['@environment']) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_initializeEnvironment", []);
+        $1 = smalltalk.send(smalltalk.send(smalltalk.HLManager || HLManager, "_current", []), "_environment", []);
     } else {
         $1 = self['@environment'];
     }
@@ -59,55 +73,20 @@ fn: function (anEnvironment) {
 }),
 smalltalk.HLCodeModel);
 
-smalltalk.addMethod(
-"_initializeAnnouncer",
-smalltalk.method({
-selector: "initializeAnnouncer",
-fn: function () {
-    var self = this;
-    var $1;
-    self['@announcer'] = smalltalk.send(smalltalk.Announcer || Announcer, "_new", []);
-    $1 = self['@announcer'];
-    return $1;
-}
-}),
-smalltalk.HLCodeModel);
-
-smalltalk.addMethod(
-"_initializeEnvironment",
-smalltalk.method({
-selector: "initializeEnvironment",
-fn: function () {
-    var self = this;
-    var $1;
-    self['@environment'] = smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []);
-    $1 = self['@environment'];
-    return $1;
-}
-}),
-smalltalk.HLCodeModel);
-
-smalltalk.addMethod(
-"_initializeReceiver",
-smalltalk.method({
-selector: "initializeReceiver",
-fn: function () {
-    var self = this;
-    var $1;
-    self['@receiver'] = smalltalk.send(smalltalk.DoIt || DoIt, "_new", []);
-    $1 = self['@receiver'];
-    return $1;
-}
-}),
-smalltalk.HLCodeModel);
-
 smalltalk.addMethod(
 "_receiver",
 smalltalk.method({
 selector: "receiver",
 fn: function () {
     var self = this;
-    return self['@receiver'];
+    var $1;
+    if (($receiver = self['@receiver']) == nil || $receiver == undefined) {
+        self['@receiver'] = smalltalk.send(self, "_defaultReceiver", []);
+        $1 = self['@receiver'];
+    } else {
+        $1 = self['@receiver'];
+    }
+    return $1;
 }
 }),
 smalltalk.HLCodeModel);
@@ -180,6 +159,32 @@ fn: function () {
 }),
 smalltalk.HLCodeWidget);
 
+smalltalk.addMethod(
+"_contents",
+smalltalk.method({
+selector: "contents",
+fn: function () {
+    var self = this;
+    var $1;
+    $1 = smalltalk.send(self['@editor'], "_getValue", []);
+    return $1;
+}
+}),
+smalltalk.HLCodeWidget);
+
+smalltalk.addMethod(
+"_contents_",
+smalltalk.method({
+selector: "contents:",
+fn: function (aString) {
+    var self = this;
+    var $1;
+    $1 = smalltalk.send(self['@editor'], "_setValue_", [aString]);
+    return $1;
+}
+}),
+smalltalk.HLCodeWidget);
+
 smalltalk.addMethod(
 "_currentLine",
 smalltalk.method({
@@ -286,7 +291,14 @@ smalltalk.method({
 selector: "model",
 fn: function () {
     var self = this;
-    return self['@model'];
+    var $1;
+    if (($receiver = self['@model']) == nil || $receiver == undefined) {
+        self['@model'] = smalltalk.send(smalltalk.HLCodeModel || HLCodeModel, "_new", []);
+        $1 = self['@model'];
+    } else {
+        $1 = self['@model'];
+    }
+    return $1;
 }
 }),
 smalltalk.HLCodeWidget);
@@ -442,6 +454,20 @@ fn: function (anObject) {
 }),
 smalltalk.HLCodeWidget);
 
+smalltalk.addMethod(
+"_renderContentOn_",
+smalltalk.method({
+selector: "renderContentOn:",
+fn: function (html) {
+    var self = this;
+    self['@code'] = smalltalk.send(html, "_textarea", []);
+    smalltalk.send(self, "_setEditorOn_", [smalltalk.send(self['@code'], "_element", [])]);
+    smalltalk.send(self, "_observeWrapper", []);
+    return self;
+}
+}),
+smalltalk.HLCodeWidget);
+
 smalltalk.addMethod(
 "_renderOn_",
 smalltalk.method({
@@ -449,7 +475,8 @@ selector: "renderOn:",
 fn: function (html) {
     var self = this;
     self['@wrapper'] = smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["code"]);
-    smalltalk.send(smalltalk.send(smalltalk.send(self, "_observeWrapper", []), "_wrapper", []), "_with_", [function () {self['@code'] = smalltalk.send(html, "_textarea", []);return self['@code'];}]);
+    smalltalk.send(self, "_observeWrapper", []);
+    smalltalk.send(self['@wrapper'], "_with_", [function () {self['@code'] = smalltalk.send(html, "_textarea", []);return self['@code'];}]);
     smalltalk.send(self, "_setEditorOn_", [smalltalk.send(self['@code'], "_element", [])]);
     return self;
 }
@@ -556,92 +583,25 @@ fn: function (aString) {
 }),
 smalltalk.HLCodeWidget);
 
-smalltalk.addMethod(
-"_wrapper",
-smalltalk.method({
-selector: "wrapper",
-fn: function () {
-    var self = this;
-    return self['@wrapper'];
-}
-}),
-smalltalk.HLCodeWidget);
 
 
-
-smalltalk.addClass('HLWorkspace', smalltalk.HLWidget, ['model', 'code'], 'Helios-Workspace');
+smalltalk.addClass('HLWorkspace', smalltalk.HLWidget, ['model', 'codeWidget'], 'Helios-Workspace');
 smalltalk.addMethod(
-"_code",
+"_codeWidget",
 smalltalk.method({
-selector: "code",
+selector: "codeWidget",
 fn: function () {
     var self = this;
-    var $1;
-    if (($receiver = self['@code']) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_initializeCode", []);
-    } else {
-        $1 = self['@code'];
-    }
-    return $1;
-}
-}),
-smalltalk.HLWorkspace);
-
-smalltalk.addMethod(
-"_ensureModel",
-smalltalk.method({
-selector: "ensureModel",
-fn: function () {
-    var self = this;
-    if (($receiver = self['@model']) == nil || $receiver == undefined) {
-        smalltalk.send(self, "_model_", [smalltalk.send(self, "_model", [])]);
+    var $2, $3, $1;
+    if (($receiver = self['@codeWidget']) == nil || $receiver == undefined) {
+        $2 = smalltalk.send(smalltalk.HLCodeWidget || HLCodeWidget, "_new", []);
+        smalltalk.send($2, "_model_", [smalltalk.send(smalltalk.send(self, "_model", []), "_code", [])]);
+        $3 = smalltalk.send($2, "_yourself", []);
+        self['@codeWidget'] = $3;
+        $1 = self['@codeWidget'];
     } else {
-        self['@model'];
+        $1 = self['@codeWidget'];
     }
-    return self;
-}
-}),
-smalltalk.HLWorkspace);
-
-smalltalk.addMethod(
-"_initializeCode",
-smalltalk.method({
-selector: "initializeCode",
-fn: function () {
-    var self = this;
-    var $1;
-    self['@code'] = smalltalk.send(self, "_makeCode", []);
-    $1 = self['@code'];
-    return $1;
-}
-}),
-smalltalk.HLWorkspace);
-
-smalltalk.addMethod(
-"_initializeModel",
-smalltalk.method({
-selector: "initializeModel",
-fn: function () {
-    var self = this;
-    var $1;
-    self['@model'] = smalltalk.send(smalltalk.HLWorkspaceModel || HLWorkspaceModel, "_new", []);
-    $1 = self['@model'];
-    return $1;
-}
-}),
-smalltalk.HLWorkspace);
-
-smalltalk.addMethod(
-"_makeCode",
-smalltalk.method({
-selector: "makeCode",
-fn: function () {
-    var self = this;
-    var $2, $3, $1;
-    $2 = smalltalk.send(smalltalk.HLCodeWidget || HLCodeWidget, "_new", []);
-    smalltalk.send($2, "_model_", [smalltalk.send(self['@model'], "_code", [])]);
-    $3 = smalltalk.send($2, "_yourself", []);
-    $1 = $3;
     return $1;
 }
 }),
@@ -655,7 +615,8 @@ fn: function () {
     var self = this;
     var $1;
     if (($receiver = self['@model']) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_initializeModel", []);
+        smalltalk.send(self, "_model_", [smalltalk.send(smalltalk.HLWorkspaceModel || HLWorkspaceModel, "_new", [])]);
+        $1 = self['@model'];
     } else {
         $1 = self['@model'];
     }
@@ -671,17 +632,17 @@ selector: "model:",
 fn: function (aModel) {
     var self = this;
     self['@model'] = aModel;
-    smalltalk.send(smalltalk.send(self, "_code", []), "_model_", [smalltalk.send(aModel, "_code", [])]);
-    smalltalk.send(self, "_observeCode", []);
+    smalltalk.send(smalltalk.send(self, "_codeWidget", []), "_model_", [smalltalk.send(aModel, "_code", [])]);
+    smalltalk.send(self, "_observeCodeWidget", []);
     return self;
 }
 }),
 smalltalk.HLWorkspace);
 
 smalltalk.addMethod(
-"_observeCode",
+"_observeCodeWidget",
 smalltalk.method({
-selector: "observeCode",
+selector: "observeCodeWidget",
 fn: function () {
     var self = this;
     return self;
@@ -728,8 +689,7 @@ smalltalk.method({
 selector: "renderContentOn:",
 fn: function (html) {
     var self = this;
-    smalltalk.send(self, "_ensureModel", []);
-    smalltalk.send(html, "_with_", [smalltalk.send(self, "_code", [])]);
+    smalltalk.send(html, "_with_", [smalltalk.send(self, "_codeWidget", [])]);
     return self;
 }
 }),
@@ -779,7 +739,8 @@ fn: function () {
     var self = this;
     var $1;
     if (($receiver = self['@announcer']) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_initializeAnnouncer", []);
+        self['@announcer'] = smalltalk.send(smalltalk.Announcer || Announcer, "_new", []);
+        $1 = self['@announcer'];
     } else {
         $1 = self['@announcer'];
     }
@@ -796,7 +757,7 @@ fn: function () {
     var self = this;
     var $1;
     if (($receiver = self['@code']) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_initializeCode", []);
+        $1 = smalltalk.send(smalltalk.HLCodeModel || HLCodeModel, "_on_", [smalltalk.send(self, "_environment", [])]);
     } else {
         $1 = self['@code'];
     }
@@ -834,34 +795,6 @@ fn: function (anEnvironment) {
 }),
 smalltalk.HLWorkspaceModel);
 
-smalltalk.addMethod(
-"_initializeAnnouncer",
-smalltalk.method({
-selector: "initializeAnnouncer",
-fn: function () {
-    var self = this;
-    var $1;
-    self['@announcer'] = smalltalk.send(smalltalk.Announcer || Announcer, "_new", []);
-    $1 = self['@announcer'];
-    return $1;
-}
-}),
-smalltalk.HLWorkspaceModel);
-
-smalltalk.addMethod(
-"_initializeCode",
-smalltalk.method({
-selector: "initializeCode",
-fn: function () {
-    var self = this;
-    var $1;
-    self['@code'] = smalltalk.send(smalltalk.HLCodeModel || HLCodeModel, "_on_", [smalltalk.send(self, "_environment", [])]);
-    $1 = self['@code'];
-    return $1;
-}
-}),
-smalltalk.HLWorkspaceModel);
-
 smalltalk.addMethod(
 "_onKeyDown_",
 smalltalk.method({

+ 146 - 243
js/Helios-Workspace.js

@@ -9,16 +9,35 @@ fn: function () {
     var self = this;
     var $1;
     if (($receiver = self['@announcer']) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_initializeAnnouncer", []);
+        self['@announcer'] = smalltalk.send(smalltalk.Announcer || Announcer, "_new", []);
+        $1 = self['@announcer'];
     } else {
         $1 = self['@announcer'];
     }
     return $1;
 },
 args: [],
-source: "announcer\x0a\x09^ announcer ifNil: [ self initializeAnnouncer ]",
-messageSends: ["ifNil:", "initializeAnnouncer"],
-referencedClasses: []
+source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
+messageSends: ["ifNil:", "new"],
+referencedClasses: ["Announcer"]
+}),
+smalltalk.HLCodeModel);
+
+smalltalk.addMethod(
+"_defaultReceiver",
+smalltalk.method({
+selector: "defaultReceiver",
+category: 'defaults',
+fn: function () {
+    var self = this;
+    var $1;
+    $1 = smalltalk.send(smalltalk.DoIt || DoIt, "_new", []);
+    return $1;
+},
+args: [],
+source: "defaultReceiver\x0a\x09^ DoIt new",
+messageSends: ["new"],
+referencedClasses: ["DoIt"]
 }),
 smalltalk.HLCodeModel);
 
@@ -49,16 +68,16 @@ fn: function () {
     var self = this;
     var $1;
     if (($receiver = self['@environment']) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_initializeEnvironment", []);
+        $1 = smalltalk.send(smalltalk.send(smalltalk.HLManager || HLManager, "_current", []), "_environment", []);
     } else {
         $1 = self['@environment'];
     }
     return $1;
 },
 args: [],
-source: "environment\x0a\x09^ environment ifNil: [ self initializeEnvironment]",
-messageSends: ["ifNil:", "initializeEnvironment"],
-referencedClasses: []
+source: "environment\x0a\x09^ environment ifNil: [ HLManager current environment ]",
+messageSends: ["ifNil:", "environment", "current"],
+referencedClasses: ["HLManager"]
 }),
 smalltalk.HLCodeModel);
 
@@ -79,63 +98,6 @@ referencedClasses: []
 }),
 smalltalk.HLCodeModel);
 
-smalltalk.addMethod(
-"_initializeAnnouncer",
-smalltalk.method({
-selector: "initializeAnnouncer",
-category: 'initialization',
-fn: function () {
-    var self = this;
-    var $1;
-    self['@announcer'] = smalltalk.send(smalltalk.Announcer || Announcer, "_new", []);
-    $1 = self['@announcer'];
-    return $1;
-},
-args: [],
-source: "initializeAnnouncer\x0a\x09^ announcer := Announcer new",
-messageSends: ["new"],
-referencedClasses: ["Announcer"]
-}),
-smalltalk.HLCodeModel);
-
-smalltalk.addMethod(
-"_initializeEnvironment",
-smalltalk.method({
-selector: "initializeEnvironment",
-category: 'initialization',
-fn: function () {
-    var self = this;
-    var $1;
-    self['@environment'] = smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []);
-    $1 = self['@environment'];
-    return $1;
-},
-args: [],
-source: "initializeEnvironment\x0a\x09^ environment := Smalltalk current ",
-messageSends: ["current"],
-referencedClasses: ["Smalltalk"]
-}),
-smalltalk.HLCodeModel);
-
-smalltalk.addMethod(
-"_initializeReceiver",
-smalltalk.method({
-selector: "initializeReceiver",
-category: 'initialization',
-fn: function () {
-    var self = this;
-    var $1;
-    self['@receiver'] = smalltalk.send(smalltalk.DoIt || DoIt, "_new", []);
-    $1 = self['@receiver'];
-    return $1;
-},
-args: [],
-source: "initializeReceiver\x0a\x09^receiver := DoIt new",
-messageSends: ["new"],
-referencedClasses: ["DoIt"]
-}),
-smalltalk.HLCodeModel);
-
 smalltalk.addMethod(
 "_receiver",
 smalltalk.method({
@@ -143,11 +105,18 @@ selector: "receiver",
 category: 'accessing',
 fn: function () {
     var self = this;
-    return self['@receiver'];
+    var $1;
+    if (($receiver = self['@receiver']) == nil || $receiver == undefined) {
+        self['@receiver'] = smalltalk.send(self, "_defaultReceiver", []);
+        $1 = self['@receiver'];
+    } else {
+        $1 = self['@receiver'];
+    }
+    return $1;
 },
 args: [],
-source: "receiver\x0a\x09^ receiver",
-messageSends: [],
+source: "receiver\x0a\x09^ receiver ifNil: [ receiver := self defaultReceiver ]",
+messageSends: ["ifNil:", "defaultReceiver"],
 referencedClasses: []
 }),
 smalltalk.HLCodeModel);
@@ -245,6 +214,42 @@ referencedClasses: []
 }),
 smalltalk.HLCodeWidget);
 
+smalltalk.addMethod(
+"_contents",
+smalltalk.method({
+selector: "contents",
+category: 'accessing',
+fn: function () {
+    var self = this;
+    var $1;
+    $1 = smalltalk.send(self['@editor'], "_getValue", []);
+    return $1;
+},
+args: [],
+source: "contents\x0a\x09^ editor getValue",
+messageSends: ["getValue"],
+referencedClasses: []
+}),
+smalltalk.HLCodeWidget);
+
+smalltalk.addMethod(
+"_contents_",
+smalltalk.method({
+selector: "contents:",
+category: 'accessing',
+fn: function (aString) {
+    var self = this;
+    var $1;
+    $1 = smalltalk.send(self['@editor'], "_setValue_", [aString]);
+    return $1;
+},
+args: ["aString"],
+source: "contents: aString\x0a\x09^ editor setValue: aString",
+messageSends: ["setValue:"],
+referencedClasses: []
+}),
+smalltalk.HLCodeWidget);
+
 smalltalk.addMethod(
 "_currentLine",
 smalltalk.method({
@@ -387,12 +392,19 @@ selector: "model",
 category: 'accessing',
 fn: function () {
     var self = this;
-    return self['@model'];
+    var $1;
+    if (($receiver = self['@model']) == nil || $receiver == undefined) {
+        self['@model'] = smalltalk.send(smalltalk.HLCodeModel || HLCodeModel, "_new", []);
+        $1 = self['@model'];
+    } else {
+        $1 = self['@model'];
+    }
+    return $1;
 },
 args: [],
-source: "model\x0a\x0a\x09^ model ",
-messageSends: [],
-referencedClasses: []
+source: "model\x0a\x09^ model ifNil: [ model := HLCodeModel new ]",
+messageSends: ["ifNil:", "new"],
+referencedClasses: ["HLCodeModel"]
 }),
 smalltalk.HLCodeWidget);
 
@@ -407,7 +419,7 @@ fn: function (aModel) {
     return self;
 },
 args: ["aModel"],
-source: "model: aModel\x0a\x0a\x09model := aModel",
+source: "model: aModel\x0a\x09model := aModel",
 messageSends: [],
 referencedClasses: []
 }),
@@ -424,7 +436,7 @@ fn: function () {
     return self;
 },
 args: [],
-source: "observeWrapper\x0a\x0a    wrapper onKeyDown: [:e | self onKeyDown: e]\x0a",
+source: "observeWrapper\x0a\x0a    wrapper onKeyDown: [ :e | self onKeyDown: e ]\x0a",
 messageSends: ["onKeyDown:"],
 referencedClasses: []
 }),
@@ -597,6 +609,25 @@ referencedClasses: []
 }),
 smalltalk.HLCodeWidget);
 
+smalltalk.addMethod(
+"_renderContentOn_",
+smalltalk.method({
+selector: "renderContentOn:",
+category: 'rendering',
+fn: function (html) {
+    var self = this;
+    self['@code'] = smalltalk.send(html, "_textarea", []);
+    smalltalk.send(self, "_setEditorOn_", [smalltalk.send(self['@code'], "_element", [])]);
+    smalltalk.send(self, "_observeWrapper", []);
+    return self;
+},
+args: ["html"],
+source: "renderContentOn: html\x0a    code := html textarea.\x0a    self setEditorOn: code element.\x0a    \x0a    self observeWrapper",
+messageSends: ["textarea", "setEditorOn:", "element", "observeWrapper"],
+referencedClasses: []
+}),
+smalltalk.HLCodeWidget);
+
 smalltalk.addMethod(
 "_renderOn_",
 smalltalk.method({
@@ -605,13 +636,14 @@ category: 'rendering',
 fn: function (html) {
     var self = this;
     self['@wrapper'] = smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["code"]);
-    smalltalk.send(smalltalk.send(smalltalk.send(self, "_observeWrapper", []), "_wrapper", []), "_with_", [function () {self['@code'] = smalltalk.send(html, "_textarea", []);return self['@code'];}]);
+    smalltalk.send(self, "_observeWrapper", []);
+    smalltalk.send(self['@wrapper'], "_with_", [function () {self['@code'] = smalltalk.send(html, "_textarea", []);return self['@code'];}]);
     smalltalk.send(self, "_setEditorOn_", [smalltalk.send(self['@code'], "_element", [])]);
     return self;
 },
 args: ["html"],
-source: "renderOn: html\x0a    wrapper := html div class: 'code'.\x0a    self observeWrapper\x0a    wrapper with: [code := html textarea].\x0a    self setEditorOn: code element.\x0a    \x0a",
-messageSends: ["class:", "div", "with:", "textarea", "wrapper", "observeWrapper", "setEditorOn:", "element"],
+source: "renderOn: html\x0a    wrapper := html div class: 'code'.\x0a    self observeWrapper.\x0a    wrapper with: [code := html textarea].\x0a    self setEditorOn: code element.\x0a    \x0a",
+messageSends: ["class:", "div", "observeWrapper", "with:", "textarea", "setEditorOn:", "element"],
 referencedClasses: []
 }),
 smalltalk.HLCodeWidget);
@@ -756,123 +788,31 @@ referencedClasses: []
 }),
 smalltalk.HLCodeWidget);
 
-smalltalk.addMethod(
-"_wrapper",
-smalltalk.method({
-selector: "wrapper",
-category: 'accessing',
-fn: function () {
-    var self = this;
-    return self['@wrapper'];
-},
-args: [],
-source: "wrapper\x0a\x0a\x09^ wrapper",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLCodeWidget);
-
 
 
-smalltalk.addClass('HLWorkspace', smalltalk.HLWidget, ['model', 'code'], 'Helios-Workspace');
+smalltalk.addClass('HLWorkspace', smalltalk.HLWidget, ['model', 'codeWidget'], 'Helios-Workspace');
 smalltalk.addMethod(
-"_code",
+"_codeWidget",
 smalltalk.method({
-selector: "code",
+selector: "codeWidget",
 category: 'accessing',
 fn: function () {
     var self = this;
-    var $1;
-    if (($receiver = self['@code']) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_initializeCode", []);
-    } else {
-        $1 = self['@code'];
-    }
-    return $1;
-},
-args: [],
-source: "code\x0a\x0a\x09^ code ifNil:[self initializeCode]",
-messageSends: ["ifNil:", "initializeCode"],
-referencedClasses: []
-}),
-smalltalk.HLWorkspace);
-
-smalltalk.addMethod(
-"_ensureModel",
-smalltalk.method({
-selector: "ensureModel",
-category: 'actions',
-fn: function () {
-    var self = this;
-    if (($receiver = self['@model']) == nil || $receiver == undefined) {
-        smalltalk.send(self, "_model_", [smalltalk.send(self, "_model", [])]);
+    var $2, $3, $1;
+    if (($receiver = self['@codeWidget']) == nil || $receiver == undefined) {
+        $2 = smalltalk.send(smalltalk.HLCodeWidget || HLCodeWidget, "_new", []);
+        smalltalk.send($2, "_model_", [smalltalk.send(smalltalk.send(self, "_model", []), "_code", [])]);
+        $3 = smalltalk.send($2, "_yourself", []);
+        self['@codeWidget'] = $3;
+        $1 = self['@codeWidget'];
     } else {
-        self['@model'];
+        $1 = self['@codeWidget'];
     }
-    return self;
-},
-args: [],
-source: "ensureModel\x0a\x09\x22Sends the #model: initialization message if needed.\x22\x0a\x0a\x09model ifNil:[\x0a\x09\x09self model: self model]\x0a\x09",
-messageSends: ["ifNil:", "model:", "model"],
-referencedClasses: []
-}),
-smalltalk.HLWorkspace);
-
-smalltalk.addMethod(
-"_initializeCode",
-smalltalk.method({
-selector: "initializeCode",
-category: 'initialization',
-fn: function () {
-    var self = this;
-    var $1;
-    self['@code'] = smalltalk.send(self, "_makeCode", []);
-    $1 = self['@code'];
     return $1;
 },
 args: [],
-source: "initializeCode\x0a\x0a\x09^ code := self makeCode.",
-messageSends: ["makeCode"],
-referencedClasses: []
-}),
-smalltalk.HLWorkspace);
-
-smalltalk.addMethod(
-"_initializeModel",
-smalltalk.method({
-selector: "initializeModel",
-category: 'initialization',
-fn: function () {
-    var self = this;
-    var $1;
-    self['@model'] = smalltalk.send(smalltalk.HLWorkspaceModel || HLWorkspaceModel, "_new", []);
-    $1 = self['@model'];
-    return $1;
-},
-args: [],
-source: "initializeModel\x0a\x0a\x09^ model := HLWorkspaceModel new",
-messageSends: ["new"],
-referencedClasses: ["HLWorkspaceModel"]
-}),
-smalltalk.HLWorkspace);
-
-smalltalk.addMethod(
-"_makeCode",
-smalltalk.method({
-selector: "makeCode",
-category: 'actions',
-fn: function () {
-    var self = this;
-    var $2, $3, $1;
-    $2 = smalltalk.send(smalltalk.HLCodeWidget || HLCodeWidget, "_new", []);
-    smalltalk.send($2, "_model_", [smalltalk.send(self['@model'], "_code", [])]);
-    $3 = smalltalk.send($2, "_yourself", []);
-    $1 = $3;
-    return $1;
-},
-args: [],
-source: "makeCode\x0a\x0a\x09^ HLCodeWidget new\x0a    \x09model: model code;\x0a        yourself",
-messageSends: ["model:", "code", "new", "yourself"],
+source: "codeWidget\x0a\x09^ codeWidget ifNil: [\x0a\x09\x09codeWidget := HLCodeWidget new\x0a    \x09\x09model: self model code;\x0a        \x09yourself ]",
+messageSends: ["ifNil:", "model:", "code", "model", "new", "yourself"],
 referencedClasses: ["HLCodeWidget"]
 }),
 smalltalk.HLWorkspace);
@@ -886,16 +826,17 @@ fn: function () {
     var self = this;
     var $1;
     if (($receiver = self['@model']) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_initializeModel", []);
+        smalltalk.send(self, "_model_", [smalltalk.send(smalltalk.HLWorkspaceModel || HLWorkspaceModel, "_new", [])]);
+        $1 = self['@model'];
     } else {
         $1 = self['@model'];
     }
     return $1;
 },
 args: [],
-source: "model\x0a\x0a\x09^ model ifNil:[self initializeModel]",
-messageSends: ["ifNil:", "initializeModel"],
-referencedClasses: []
+source: "model\x0a\x09^ model ifNil: [ \x0a    \x09self model: HLWorkspaceModel new.\x0a\x09\x09model ]",
+messageSends: ["ifNil:", "model:", "new"],
+referencedClasses: ["HLWorkspaceModel"]
 }),
 smalltalk.HLWorkspace);
 
@@ -907,28 +848,28 @@ category: 'accessing',
 fn: function (aModel) {
     var self = this;
     self['@model'] = aModel;
-    smalltalk.send(smalltalk.send(self, "_code", []), "_model_", [smalltalk.send(aModel, "_code", [])]);
-    smalltalk.send(self, "_observeCode", []);
+    smalltalk.send(smalltalk.send(self, "_codeWidget", []), "_model_", [smalltalk.send(aModel, "_code", [])]);
+    smalltalk.send(self, "_observeCodeWidget", []);
     return self;
 },
 args: ["aModel"],
-source: "model: aModel\x0a\x0a\x09model := aModel.\x0a     \x0a    self code model: aModel code.\x0a    self observeCode.\x0a    ",
-messageSends: ["model:", "code", "observeCode"],
+source: "model: aModel\x0a\x09model := aModel.\x0a     \x0a    self codeWidget model: aModel code.\x0a    self observeCodeWidget.\x0a    ",
+messageSends: ["model:", "code", "codeWidget", "observeCodeWidget"],
 referencedClasses: []
 }),
 smalltalk.HLWorkspace);
 
 smalltalk.addMethod(
-"_observeCode",
+"_observeCodeWidget",
 smalltalk.method({
-selector: "observeCode",
+selector: "observeCodeWidget",
 category: 'actions',
 fn: function () {
     var self = this;
     return self;
 },
 args: [],
-source: "observeCode\x0a\x0a",
+source: "observeCodeWidget\x0a\x0a",
 messageSends: [],
 referencedClasses: []
 }),
@@ -989,13 +930,12 @@ selector: "renderContentOn:",
 category: 'rendering',
 fn: function (html) {
     var self = this;
-    smalltalk.send(self, "_ensureModel", []);
-    smalltalk.send(html, "_with_", [smalltalk.send(self, "_code", [])]);
+    smalltalk.send(html, "_with_", [smalltalk.send(self, "_codeWidget", [])]);
     return self;
 },
 args: ["html"],
-source: "renderContentOn: html\x0a\x0a\x09self ensureModel.\x0a    \x0a\x09html with: self code\x0a    ",
-messageSends: ["ensureModel", "with:", "code"],
+source: "renderContentOn: html\x0a\x09html with: self codeWidget\x0a    ",
+messageSends: ["with:", "codeWidget"],
 referencedClasses: []
 }),
 smalltalk.HLWorkspace);
@@ -1060,16 +1000,17 @@ fn: function () {
     var self = this;
     var $1;
     if (($receiver = self['@announcer']) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_initializeAnnouncer", []);
+        self['@announcer'] = smalltalk.send(smalltalk.Announcer || Announcer, "_new", []);
+        $1 = self['@announcer'];
     } else {
         $1 = self['@announcer'];
     }
     return $1;
 },
 args: [],
-source: "announcer\x0a\x09^ announcer ifNil: [ self initializeAnnouncer ]",
-messageSends: ["ifNil:", "initializeAnnouncer"],
-referencedClasses: []
+source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
+messageSends: ["ifNil:", "new"],
+referencedClasses: ["Announcer"]
 }),
 smalltalk.HLWorkspaceModel);
 
@@ -1082,16 +1023,16 @@ fn: function () {
     var self = this;
     var $1;
     if (($receiver = self['@code']) == nil || $receiver == undefined) {
-        $1 = smalltalk.send(self, "_initializeCode", []);
+        $1 = smalltalk.send(smalltalk.HLCodeModel || HLCodeModel, "_on_", [smalltalk.send(self, "_environment", [])]);
     } else {
         $1 = self['@code'];
     }
     return $1;
 },
 args: [],
-source: "code\x0a\x09\x22Answers the code model working for this workspace model\x22\x0a\x09^ code ifNil:[self initializeCode]",
-messageSends: ["ifNil:", "initializeCode"],
-referencedClasses: []
+source: "code\x0a\x09\x22Answers the code model working for this workspace model\x22\x0a\x09^ code ifNil:[ HLCodeModel on: self environment ]",
+messageSends: ["ifNil:", "on:", "environment"],
+referencedClasses: ["HLCodeModel"]
 }),
 smalltalk.HLWorkspaceModel);
 
@@ -1134,44 +1075,6 @@ referencedClasses: []
 }),
 smalltalk.HLWorkspaceModel);
 
-smalltalk.addMethod(
-"_initializeAnnouncer",
-smalltalk.method({
-selector: "initializeAnnouncer",
-category: 'initialization',
-fn: function () {
-    var self = this;
-    var $1;
-    self['@announcer'] = smalltalk.send(smalltalk.Announcer || Announcer, "_new", []);
-    $1 = self['@announcer'];
-    return $1;
-},
-args: [],
-source: "initializeAnnouncer\x0a\x09^ announcer := Announcer new",
-messageSends: ["new"],
-referencedClasses: ["Announcer"]
-}),
-smalltalk.HLWorkspaceModel);
-
-smalltalk.addMethod(
-"_initializeCode",
-smalltalk.method({
-selector: "initializeCode",
-category: 'initialization',
-fn: function () {
-    var self = this;
-    var $1;
-    self['@code'] = smalltalk.send(smalltalk.HLCodeModel || HLCodeModel, "_on_", [smalltalk.send(self, "_environment", [])]);
-    $1 = self['@code'];
-    return $1;
-},
-args: [],
-source: "initializeCode\x0a\x0a\x09^ code := HLCodeModel on: self environment",
-messageSends: ["on:", "environment"],
-referencedClasses: ["HLCodeModel"]
-}),
-smalltalk.HLWorkspaceModel);
-
 smalltalk.addMethod(
 "_onKeyDown_",
 smalltalk.method({

+ 106 - 107
st/Helios-Browser.st

@@ -113,10 +113,14 @@ model
 !
 
 model: aBrowserModel
-	"TODO: unsubscribe from previous model"
-    
 	model := aBrowserModel.
-    model subscribe: self
+    
+    self observeModel
+! !
+
+!HLBrowserListWidget methodsFor: 'actions'!
+
+observeModel
 ! !
 
 !HLBrowserListWidget class methodsFor: 'instance creation'!
@@ -162,15 +166,11 @@ focusProtocolsListWidget
 	self model announcer announce: HLProtocolsListFocus new
 !
 
-packageSelected: aPackage
-    self selectedItem: nil.
-    
-    self items: (aPackage 
-    	ifNil: [ #() ]
-  		ifNotNil: [ (aPackage classes 
-        	collect: [ :each | each theNonMetaClass ]) asSet asArray ]).
-
-    self refresh
+observeModel
+	self model announcer 
+    	on: HLPackageSelected do: [ :ann | self onPackageSelected: ann item ];
+    	on: HLShowInstanceToggled do: [ :ann | self onShowInstanceToggled ];
+		on: HLClassSelected do: [ :ann | self onClassSelected: ann item ]
 !
 
 selectItem: aClass
@@ -182,15 +182,25 @@ showInstance: aBoolean
 	self model showInstance: aBoolean
 ! !
 
-!HLClassesListWidget methodsFor: 'announcements'!
+!HLClassesListWidget methodsFor: 'reactions'!
+
+onClassSelected: aClass
+	self focus
+!
+
+onPackageSelected: aPackage
+    self selectedItem: nil.
+    
+    self items: (aPackage 
+    	ifNil: [ #() ]
+  		ifNotNil: [ (aPackage classes 
+        	collect: [ :each | each theNonMetaClass ]) asSet asArray ]).
+
+    self refresh
+!
 
-subscribeTo: anAnnouncer
-	anAnnouncer on: HLPackageSelected do: [ :ann |
-    	self packageSelected: ann item ].
-    anAnnouncer on: HLShowInstanceToggled do: [ :ann |
-    	self refresh ].
-    anAnnouncer on: HLClassSelected do: [ :ann |
-    	self focus ]
+onShowInstanceToggled
+	self refresh
 ! !
 
 !HLClassesListWidget methodsFor: 'rendering'!
@@ -316,16 +326,13 @@ selectorsCache
 
 !HLMethodsListWidget methodsFor: 'actions'!
 
-protocolSelected: aString
-    self selectedItem: nil.
-    
-    self items: (self model selectedClass 
-    	ifNil: [ #() ]
-      	ifNotNil: [ aString
-    		ifNil: [ #() ]
-      		ifNotNil: [ self methodsInProtocol: aString ] ]).
-        
-    self refresh
+observeModel
+	self model announcer on: HLProtocolSelected do: [ :ann |
+    	self onProtocolSelected: ann item ].
+    self model announcer on: HLShowInstanceToggled do: [ :ann |
+    	self onProtocolSelected: nil ].
+    self model announcer on: HLMethodSelected do: [ :ann |
+    	self onMethodSelected: ann item ]
 !
 
 selectItem: aCompiledMethod
@@ -333,17 +340,6 @@ selectItem: aCompiledMethod
    	self model selectedMethod: aCompiledMethod
 ! !
 
-!HLMethodsListWidget methodsFor: 'announcements'!
-
-subscribeTo: anAnnouncer
-	anAnnouncer on: HLProtocolSelected do: [ :ann |
-    	self protocolSelected: ann item ].
-    anAnnouncer on: HLShowInstanceToggled do: [ :ann |
-    	self protocolSelected: nil ].
-    anAnnouncer on: HLMethodSelected do: [ :ann |
-    	self focus ]
-! !
-
 !HLMethodsListWidget methodsFor: 'cache'!
 
 flushSelectorsCache
@@ -357,6 +353,24 @@ initialize
     self flushSelectorsCache
 ! !
 
+!HLMethodsListWidget methodsFor: 'reactions'!
+
+onMethodSelected: aMethod
+	self focus
+!
+
+onProtocolSelected: aString
+    self selectedItem: nil.
+    
+    self items: (self model selectedClass 
+    	ifNil: [ #() ]
+      	ifNotNil: [ aString
+    		ifNil: [ #() ]
+      		ifNotNil: [ self methodsInProtocol: aString ] ]).
+        
+    self refresh
+! !
+
 !HLMethodsListWidget methodsFor: 'rendering'!
 
 renderContentOn: html
@@ -406,16 +420,20 @@ focusClassesListWidget
 	self model announcer announce: HLClassesListFocus new
 !
 
+observeModel
+    self model announcer on: HLPackageSelected do: [ :ann |
+    	self onPackageSelected: ann item ]
+!
+
 selectItem: aPackage
 	super selectItem: aPackage.
     self model selectedPackage: aPackage
 ! !
 
-!HLPackagesListWidget methodsFor: 'announcements'!
+!HLPackagesListWidget methodsFor: 'reactions'!
 
-subscribeTo: anAnnouncer
-    anAnnouncer on: HLPackageSelected do: [ :ann |
-    	self focus ]
+onPackageSelected: aPackage
+	self focus
 ! !
 
 !HLPackagesListWidget methodsFor: 'rendering'!
@@ -457,7 +475,23 @@ selectedItem
 
 !HLProtocolsListWidget methodsFor: 'actions'!
 
-classSelected: aClass
+observeModel
+	self model announcer on: HLClassSelected do: [ :ann |
+    	self onClassSelected: ann item ].
+    self model announcer on: HLShowInstanceToggled do: [ :ann |
+    	self onClassSelected: self model selectedClass ].
+    self model announcer on: HLProtocolSelected do: [ :ann |
+    	self onProtocolSelected: ann item ]
+!
+
+selectItem: aString
+	super selectItem: aString.
+    self model selectedProtocol: aString
+! !
+
+!HLProtocolsListWidget methodsFor: 'reactions'!
+
+onClassSelected: aClass
     self selectedItem: nil.
     
     self items: (aClass
@@ -470,20 +504,8 @@ classSelected: aClass
     self refresh
 !
 
-selectItem: aString
-	super selectItem: aString.
-    self model selectedProtocol: aString
-! !
-
-!HLProtocolsListWidget methodsFor: 'announcements'!
-
-subscribeTo: anAnnouncer
-	anAnnouncer on: HLClassSelected do: [ :ann |
-    	self classSelected: ann item ].
-    anAnnouncer on: HLShowInstanceToggled do: [ :ann |
-    	self classSelected: self model selectedClass ].
-    anAnnouncer on: HLProtocolSelected do: [ :ann |
-    	self focus ]
+onProtocolSelected: aString
+	self focus
 ! !
 
 !HLProtocolsListWidget methodsFor: 'rendering'!
@@ -507,7 +529,7 @@ allProtocol
 !
 
 environment
-	^ environment ifNil: [ self initializeEnvironment ]
+	^ environment ifNil: [ HLManager current environment ]
 !
 
 environment: anEnvironment
@@ -598,22 +620,6 @@ showInstance: aBoolean
     self announcer announce: HLShowInstanceToggled new
 ! !
 
-!HLBrowserModel methodsFor: 'actions'!
-
-beLocal
-
-	self initializeEnvironment
-!
-
-beRemoteOn: anIPAddress port: aPort
-
-	"to-do"
-    
-    "environment := HLRemoteEnvironment on: anIPAddress port: aPort
-    
-    ...kind of stuff"
-! !
-
 !HLBrowserModel methodsFor: 'announcements'!
 
 announcer
@@ -624,12 +630,6 @@ subscribe: aWidget
 	aWidget subscribeTo: self announcer
 ! !
 
-!HLBrowserModel methodsFor: 'initialization'!
-
-initializeEnvironment
-	^ environment := HLLocalEnvironment new
-! !
-
 !HLBrowserModel class methodsFor: 'actions'!
 
 on: anEnvironment
@@ -640,17 +640,21 @@ on: anEnvironment
 ! !
 
 HLWidget subclass: #HLBrowserSourceWidget
-	instanceVariableNames: 'model sourceArea'
+	instanceVariableNames: 'model codeWidget'
 	package: 'Helios-Browser'!
 
 !HLBrowserSourceWidget methodsFor: 'accessing'!
 
+codeWidget
+	^ codeWidget ifNil: [ codeWidget := HLCodeWidget new ]
+!
+
 contents
 	^ self sourceArea contents
 !
 
 contents: aString
-	self sourceArea contents: aString
+	self codeWidget contents: aString
 !
 
 model
@@ -658,51 +662,46 @@ model
 !
 
 model: aBrowserModel
-	"TODO: unsubscribe from previous model"
-    
 	model := aBrowserModel.
-    model subscribe: self
-!
-
-sourceArea
-	^ sourceArea ifNil: [ sourceArea := HLSourceArea new ]
+    
+    self observeModel
 ! !
 
 !HLBrowserSourceWidget methodsFor: 'actions'!
 
-classSelected: aClass
+observeModel
+	self model announcer on: HLMethodSelected do: [ :ann |
+    	self onMethodSelected: ann item ].
+    self model announcer on: HLClassSelected do: [ :ann |
+    	self onClassSelected: ann item ].
+    self model announcer on: HLProtocolSelected do: [ :ann |
+    	self onProtocolSelected: ann item ]
+! !
+
+!HLBrowserSourceWidget methodsFor: 'reactions'!
+
+onClassSelected: aClass
 	aClass ifNil: [ ^ self contents: '' ].
     
     self contents: aClass definition
 !
 
-methodSelected: aCompiledMethod
+onMethodSelected: aCompiledMethod
 	aCompiledMethod ifNil: [ ^ self contents: '' ].
     
     self contents: aCompiledMethod source
 !
 
-protocolSelected: aString
+onProtocolSelected: aString
 	self model selectedClass ifNil: [ ^ self contents: '' ].
     
     self contents: self model selectedClass definition
 ! !
 
-!HLBrowserSourceWidget methodsFor: 'announcements'!
-
-subscribeTo: anAnnouncer
-	anAnnouncer on: HLMethodSelected do: [ :ann |
-    	self methodSelected: ann item ].
-    anAnnouncer on: HLClassSelected do: [ :ann |
-    	self classSelected: ann item ].
-    anAnnouncer on: HLProtocolSelected do: [ :ann |
-    	self protocolSelected: ann item ]
-! !
-
 !HLBrowserSourceWidget methodsFor: 'rendering'!
 
 renderContentOn: html
-	self sourceArea renderOn: html
+	self codeWidget renderOn: html
 ! !
 
 !HLBrowserSourceWidget class methodsFor: 'instance creation'!

+ 19 - 187
st/Helios-Core.st

@@ -1,171 +1,4 @@
 Smalltalk current createPackage: 'Helios-Core' properties: #{}!
-Widget subclass: #HLSourceArea
-	instanceVariableNames: 'editor textarea div receiver onDoIt'
-	package: 'Helios-Core'!
-
-!HLSourceArea methodsFor: 'accessing'!
-
-contents
-    ^editor getValue
-!
-
-contents: aString
-    editor setValue: aString
-!
-
-currentLine
-    ^editor getLine: (editor getCursor line)
-!
-
-currentLineOrSelection
-    ^editor somethingSelected
-	ifFalse: [self currentLine]
-	ifTrue: [self selection]
-!
-
-editor
-	^editor
-!
-
-onDoIt
-	^onDoIt
-!
-
-onDoIt: aBlock
-	onDoIt := aBlock
-!
-
-receiver
-	^receiver ifNil: [DoIt new]
-!
-
-receiver: anObject
-	receiver := anObject
-!
-
-selection
-	^editor getSelection
-!
-
-selectionEnd
-   ^textarea element selectionEnd
-!
-
-selectionEnd: anInteger
-   textarea element selectionEnd: anInteger
-!
-
-selectionStart
-   ^textarea element selectionStart
-!
-
-selectionStart: anInteger
-   textarea element selectionStart: anInteger
-!
-
-setEditorOn: aTextarea
-	<self['@editor'] = CodeMirror.fromTextArea(aTextarea, {
-		theme: 'amber',
-                lineNumbers: true,
-                enterMode: 'flat',
-                matchBrackets: true,
-                electricChars: false
-	})>
-!
-
-val
-    ^editor getValue
-!
-
-val: aString
-    editor setValue: aString
-! !
-
-!HLSourceArea methodsFor: 'actions'!
-
-clear
-      self contents: ''
-!
-
-doIt
-    | result |
-    result := self eval: self currentLineOrSelection.
-    self onDoIt ifNotNil: [self onDoIt value].
-    ^result
-!
-
-eval: aString
-	| compiler  |
-	compiler := Compiler new.
-	[compiler parseExpression: aString] on: Error do: [:ex |
-		^window alert: ex messageText].
-	^(compiler eval: (compiler compile: 'doIt ^[', aString, '] value' forClass: DoIt)) fn applyTo: self receiver arguments: #()
-!
-
-fileIn
-    Importer new import: self currentLineOrSelection readStream
-!
-
-handleKeyDown: anEvent
-    <if(anEvent.ctrlKey) {
-		if(anEvent.keyCode === 80) { //ctrl+p
-			self._printIt();
-			anEvent.preventDefault();
-			return false;
-		}
-		if(anEvent.keyCode === 68) { //ctrl+d
-			self._doIt();
-			anEvent.preventDefault();
-			return false;
-		}
-		if(anEvent.keyCode === 73) { //ctrl+i
-			self._inspectIt();
-			anEvent.preventDefault();
-			return false;
-		}
-	}>
-!
-
-inspectIt
-    self doIt inspect
-!
-
-print: aString
-	| start stop |
-	start := HashedCollection new.
-	stop := HashedCollection new.
-	start at: 'line' put: (editor getCursor: false) line.
-	start at: 'ch' put: (editor getCursor: false) ch.
-	stop at: 'line' put: (start at: 'line').
-	stop at: 'ch' put: ((start at: 'ch') + aString size + 2).
-	editor replaceSelection: (editor getSelection, ' ', aString, ' ').
-	editor setCursor: (editor getCursor: true).
-	editor setSelection: stop end: start
-!
-
-printIt
-    self print: self doIt printString
-! !
-
-!HLSourceArea methodsFor: 'events'!
-
-onKeyDown: aBlock
-	div onKeyDown: aBlock
-!
-
-onKeyUp: aBlock
-	div onKeyUp: aBlock
-! !
-
-!HLSourceArea methodsFor: 'rendering'!
-
-renderOn: html
-    div := html div class: 'source'.
-    div with: [textarea := html textarea].
-    self setEditorOn: textarea element.
-    div onKeyDown: [:e | self handleKeyDown: e]
-! !
-
 Object subclass: #HLTab
 	instanceVariableNames: 'widget label'
 	package: 'Helios-Core'!
@@ -216,18 +49,17 @@ on: aWidget labelled: aString
 ! !
 
 Widget subclass: #HLWidget
-	instanceVariableNames: 'rootDiv'
+	instanceVariableNames: 'wrapper'
 	package: 'Helios-Core'!
 
 !HLWidget methodsFor: 'accessing'!
 
 manager
 	^ HLManager current
-! !
-
-!HLWidget methodsFor: 'announcements'!
+!
 
-subscribeTo: anAnnouncer
+wrapper
+	^ wrapper
 ! !
 
 !HLWidget methodsFor: 'keybindings'!
@@ -247,17 +79,17 @@ renderContentOn: html
 renderOn: html
     self registerBindings.
 
-	rootDiv := html div with: [
+	wrapper := html div with: [
     	self renderContentOn: html ]
 ! !
 
 !HLWidget methodsFor: 'updating'!
 
 refresh
-	rootDiv ifNil: [ ^ self ].
+	self wrapper ifNil: [ ^ self ].
     
-	rootDiv asJQuery empty.
-    [ :html | self renderContentOn: html ] appendToJQuery: rootDiv asJQuery
+	self wrapper asJQuery empty.
+    [ :html | self renderContentOn: html ] appendToJQuery: self wrapper asJQuery
 ! !
 
 !HLWidget class methodsFor: 'accessing'!
@@ -305,7 +137,7 @@ focus
 !
 
 hasFocus
-	^ rootDiv notNil and: [ rootDiv asJQuery hasClass: self focusClass ]
+	^ self wrapper notNil and: [ self wrapper asJQuery hasClass: self focusClass ]
 ! !
 
 !HLFocusableWidget methodsFor: 'rendering'!
@@ -316,15 +148,15 @@ renderContentOn: html
 renderHiddenInputOn: html
 	hiddenInput := html input
     	style: 'position: absolute; left: -100000px;';
-    	onBlur: [ rootDiv asJQuery removeClass: self focusClass ];
-        onFocus: [ rootDiv asJQuery addClass: self focusClass ]
+    	onBlur: [ self wrapper asJQuery removeClass: self focusClass ];
+        onFocus: [ self wrapper asJQuery addClass: self focusClass ]
 !
 
 renderOn: html
 	self registerBindings.
 	self renderHiddenInputOn: html.
     
-    rootDiv := html div 
+    wrapper := html div 
     	class: 'hl_widget'; 
         onClick: [ hiddenInput asJQuery focus ];
         with: [
@@ -348,7 +180,7 @@ iconForItem: anObject
 !
 
 items
-	^ items ifNil: [ self initializeItems ]
+	^ items ifNil: [ items := self defaultItems ]
 !
 
 items: aCollection
@@ -390,6 +222,12 @@ selectItem: anObject
 	self selectedItem: anObject
 ! !
 
+!HLListWidget methodsFor: 'defaults'!
+
+defaultItems
+	^ #()
+! !
+
 !HLListWidget methodsFor: 'events'!
 
 setupKeyBindings
@@ -406,12 +244,6 @@ setupKeyBindings
 			self activateListItem: next ] ]
 ! !
 
-!HLListWidget methodsFor: 'initializing'!
-
-initializeItems
-	^ items := #()
-! !
-
 !HLListWidget methodsFor: 'rendering'!
 
 renderButtonsOn: html

+ 65 - 171
st/Helios-Inspector.st

@@ -1,138 +1,105 @@
 Smalltalk current createPackage: 'Helios-Inspector' properties: #{}!
 HLWidget subclass: #HLInspector
-	instanceVariableNames: 'model variables display code label'
+	instanceVariableNames: 'model variablesWidget displayWidget codeWidget label'
 	package: 'Helios-Inspector'!
 
 !HLInspector methodsFor: 'accessing'!
 
-code
-
-	^ code ifNil:[self initializeCode]
+codeWidget
+	^ codeWidget ifNil: [
+		codeWidget := HLCodeWidget new
+    		model: model code;
+        	receiver: model inspectee;
+        	yourself ]
 !
 
-display
-
-	^ display ifNil:[self initializeDisplay]
+displayWidget
+	^ displayWidget ifNil: [
+		displayWidget := HLInspectorDisplayWidget new
+    		model: self model;
+        	yourself ]
 !
 
 inspectee
-
 	^ self model inspectee
 !
 
 inspectee: anObject
-
 	self model inspectee: anObject
 !
 
 label
-	
-    ^ label ifNil:[self initializeLabel]
+    ^ label ifNil: [ model inspectee printString ]
 !
 
 model
-
-	^ model ifNil:[self initializeModel]
+	^ model ifNil: [ 
+    	self model: HLInspectorModel new.
+		model ]
 !
 
 model: aModel
-
-	model := aModel.
-     
-    self code model: aModel code.
-    self observeCode.
+	model := aModel. 
+    self codeWidget model: aModel code.
+    
+    self 
+        observeCodeWidget;
+    	observeVariablesWidget;
+        observeModel
 !
 
 tabLabel
-	
     ^ self label
 !
 
-variables
-
-	^ variables ifNil:[self initializeVariables]
+variablesWidget
+	^ variablesWidget ifNil: [
+		variablesWidget := HLInspectorVariablesWidget new
+    		model: self model;
+        	yourself ]
 ! !
 
 !HLInspector methodsFor: 'actions'!
 
-ensureModel
-	"Sends the #model: initialization message if needed."
-
-	self observeVariables.
-        
-	model ifNil:[
-		self model: self model]
-!
-
 inspect: anObject
-
 	self model inspect: anObject on: self.
     
 	self 
-    	refreshVariables;
-		refreshDisplay;
-        yourself
-!
-
-makeCode
-
-	^ HLCodeWidget new
-    	model: model code;
-        receiver: model inspectee;
-        yourself.
-!
-
-makeDisplay
-
-	^ HLInspectorDisplay new
-    	model: self model;
-        yourself
-!
-
-makeVariables
-
-	^ HLInspectorVariables new
-    	model: self model;
-        yourself
+    	refreshVariablesWidget;
+		refreshDisplayWidget
 !
 
-observeCode
-
-	self code announcer 
+observeCodeWidget
+	self codeWidget announcer 
     	on: HLDoItExecuted 
-        do: [self onDoneIt]
+        do: [ self onDoneIt ]
 !
 
-observeVariables
-
-	self variables announcer 
-    	on: HLRefreshRequested do:[:ann| self onRefresh];
-        on: HLDiveRequested do:[self onDive];
-        yourself.
-
+observeModel
 	self model announcer
-        on: HLInstanceVariableSelected do:[:ann| self onInstanceVariableSelected];
-        yourself.
+        on: HLInstanceVariableSelected do: [ :ann | self onInstanceVariableSelected ]
 !
 
-open
+observeVariablesWidget
+	self variablesWidget announcer 
+    	on: HLRefreshRequested do: [ :ann | self onRefresh ];
+        on: HLDiveRequested do:[ self onDive ]
+!
 
+open
 	HLManager current addTab: (HLTab on: self labelled: self tabLabel)
 !
 
 refresh
-
 	self inspect: self inspectee
 !
 
-refreshDisplay
-
-	self display refresh
+refreshDisplayWidget
+	self displayWidget refresh
 !
 
-refreshVariables
-
-	self variables refresh
+refreshVariablesWidget
+	self variablesWidget refresh
 !
 
 setLabel: aString
@@ -140,34 +107,9 @@ setLabel: aString
 !
 
 setVariables: aDictionary
-
 	self model variables: aDictionary
 ! !
 
-!HLInspector methodsFor: 'initialization'!
-
-initializeCode
-
-	^ code := self makeCode.
-!
-
-initializeDisplay
-	^ display := self makeDisplay
-!
-
-initializeLabel
-	^ label := model inspectee printString
-!
-
-initializeModel
-
-	^ model := HLInspectorModel new
-!
-
-initializeVariables
-	^ variables := self makeVariables
-! !
-
 !HLInspector methodsFor: 'reactions'!
 
 onDive
@@ -175,9 +117,6 @@ onDive
 	self inspect: self model selectedInstVarObject
 !
 
-onDoIt
-!
-
 onDoneIt
 
 	self refresh
@@ -187,9 +126,8 @@ onInspectIt
 !
 
 onInstanceVariableSelected
-
-	self code receiver: self model selectedInstVarObject.
-	self refreshDisplay
+	self codeWidget receiver: self model selectedInstVarObject.
+	self refreshDisplayWidget
 !
 
 onPrintIt
@@ -203,14 +141,11 @@ onRefresh
 !HLInspector methodsFor: 'rendering'!
 
 renderContentOn: html
-
-	self ensureModel.
-    
    	html with: (HLContainer with: (HLHorizontalSplitter
     	with: (HLVerticalSplitter 
-            		with: self variables
-            	    with: self display)
-        with: self code))
+            		with: self variablesWidget
+            	    with: self displayWidget)
+        with: self codeWidget))
 ! !
 
 !HLInspector class methodsFor: 'accessing'!
@@ -229,11 +164,11 @@ canBeOpenAsTab
 	^ false
 ! !
 
-HLNavigationListWidget subclass: #HLInspectorDisplay
+HLNavigationListWidget subclass: #HLInspectorDisplayWidget
 	instanceVariableNames: 'model'
 	package: 'Helios-Inspector'!
 
-!HLInspectorDisplay methodsFor: 'accessing'!
+!HLInspectorDisplayWidget methodsFor: 'accessing'!
 
 model
 
@@ -245,7 +180,7 @@ model: aModel
 	model := aModel
 ! !
 
-!HLInspectorDisplay methodsFor: 'rendering'!
+!HLInspectorDisplayWidget methodsFor: 'rendering'!
 
 renderContentOn: html
 	
@@ -267,12 +202,12 @@ Object subclass: #HLInspectorModel
 !HLInspectorModel methodsFor: 'accessing'!
 
 announcer
-	^ announcer ifNil: [ self initializeAnnouncer ]
+	^ announcer ifNil: [announcer := Announcer new ]
 !
 
 code
 	"Answers the code model working for this workspace model"
-	^ code ifNil:[self initializeCode]
+	^ code ifNil:[ code := HLCodeModel on: self environment ]
 !
 
 environment
@@ -284,58 +219,48 @@ environment: anEnvironment
 !
 
 inspectee 
-
 	^ inspectee
 !
 
 inspectee: anObject 
-
 	inspectee := anObject
 !
 
 selectedInstVarObject
-
 	^ self instVarObjectAt: self selection
 !
 
 selection
-
-	^ selection ifNil:[self initializeSelection]
+	^ selection ifNil:[ '' ]
 !
 
 selection: anObject
-
 	selection := anObject.
 
 	self announcer announce: (HLInstanceVariableSelected on: selection)
 !
 
 variables
-
 	^ variables
 !
 
 variables: aCollection
-
 	variables := aCollection
 ! !
 
 !HLInspectorModel methodsFor: 'actions'!
 
 inspect: anObject on: anInspector
-
 	inspectee := anObject.
 	variables := #().
 	inspectee inspectOn: anInspector
 !
 
 instVarObjectAt: anInstVarName
-
 	^ self variables at: anInstVarName
 !
 
 selectedInstVar: anInstVarName
-
     self selection: anInstVarName
 !
 
@@ -343,22 +268,6 @@ subscribe: aWidget
 	aWidget subscribeTo: self announcer
 ! !
 
-!HLInspectorModel methodsFor: 'initialization'!
-
-initializeAnnouncer
-	^ announcer := Announcer new
-!
-
-initializeCode
-
-	^ code := HLCodeModel on: self environment
-!
-
-initializeSelection
-
-	^ selection := ''
-! !
-
 !HLInspectorModel methodsFor: 'reactions'!
 
 onKeyDown: anEvent
@@ -391,72 +300,57 @@ on: anEnvironment
         yourself
 ! !
 
-HLNavigationListWidget subclass: #HLInspectorVariables
+HLNavigationListWidget subclass: #HLInspectorVariablesWidget
 	instanceVariableNames: 'announcer model list diveButton'
 	package: 'Helios-Inspector'!
 
-!HLInspectorVariables methodsFor: 'accessing'!
+!HLInspectorVariablesWidget methodsFor: 'accessing'!
 
 announcer
-
-	^ announcer ifNil:[self initializeAnnouncer]
+	^ announcer ifNil:[ announcer := Announcer new ]
 !
 
 model
-	
     ^ model
 !
 
 model: aModel
-	
     model := aModel
 !
 
 selection
-
 	^ model selection
 !
 
 variables
-
 	^ model variables
 ! !
 
-!HLInspectorVariables methodsFor: 'actions'!
+!HLInspectorVariablesWidget methodsFor: 'actions'!
 
 refresh
-
 	self resetItems.
-    
     super refresh
 !
 
 resetItems
-
 	items := nil
 ! !
 
-!HLInspectorVariables methodsFor: 'initialization'!
-
-initializeAnnouncer
+!HLInspectorVariablesWidget methodsFor: 'defaults'!
 
-	^ announcer := Announcer new
-!
-
-initializeItems
-	^ items := self model variables keys
+defaultItems
+	^ self model variables keys
 ! !
 
-!HLInspectorVariables methodsFor: 'reactions'!
+!HLInspectorVariablesWidget methodsFor: 'reactions'!
 
 selectItem: anObject
-	   
 	super selectItem: anObject.
-    
     self model selectedInstVar: anObject
 ! !
 
-!HLInspectorVariables methodsFor: 'rendering'!
+!HLInspectorVariablesWidget methodsFor: 'rendering'!
 
 renderButtonsOn: html
 

+ 39 - 77
st/Helios-Workspace.st

@@ -6,11 +6,11 @@ Object subclass: #HLCodeModel
 !HLCodeModel methodsFor: 'accessing'!
 
 announcer
-	^ announcer ifNil: [ self initializeAnnouncer ]
+	^ announcer ifNil: [ announcer := Announcer new ]
 !
 
 environment
-	^ environment ifNil: [ self initializeEnvironment]
+	^ environment ifNil: [ HLManager current environment ]
 !
 
 environment: anEnvironment
@@ -18,7 +18,7 @@ environment: anEnvironment
 !
 
 receiver
-	^ receiver
+	^ receiver ifNil: [ receiver := self defaultReceiver ]
 !
 
 receiver: anObject
@@ -36,18 +36,10 @@ subscribe: aWidget
 	aWidget subscribeTo: self announcer
 ! !
 
-!HLCodeModel methodsFor: 'initialization'!
-
-initializeAnnouncer
-	^ announcer := Announcer new
-!
-
-initializeEnvironment
-	^ environment := Smalltalk current
-!
+!HLCodeModel methodsFor: 'defaults'!
 
-initializeReceiver
-	^receiver := DoIt new
+defaultReceiver
+	^ DoIt new
 ! !
 
 !HLCodeModel class methodsFor: 'actions'!
@@ -69,6 +61,14 @@ announcer
 	^ self model announcer
 !
 
+contents
+	^ editor getValue
+!
+
+contents: aString
+	^ editor setValue: aString
+!
+
 currentLine
     ^editor getLine: (editor getCursor line)
 !
@@ -80,12 +80,10 @@ currentLineOrSelection
 !
 
 model
-
-	^ model
+	^ model ifNil: [ model := HLCodeModel new ]
 !
 
 model: aModel
-
 	model := aModel
 !
 
@@ -123,11 +121,6 @@ val
 
 val: aString
     code setValue: aString
-!
-
-wrapper
-
-	^ wrapper
 ! !
 
 !HLCodeWidget methodsFor: 'actions'!
@@ -174,7 +167,7 @@ makeInspectorOn: anObject
 
 observeWrapper
 
-    wrapper onKeyDown: [:e | self onKeyDown: e]
+    wrapper onKeyDown: [ :e | self onKeyDown: e ]
 !
 
 print: aString
@@ -252,66 +245,49 @@ onPrintIt
 
 !HLCodeWidget methodsFor: 'rendering'!
 
+renderContentOn: html
+    code := html textarea.
+    self setEditorOn: code element.
+    
+    self observeWrapper
+!
+
 renderOn: html
     wrapper := html div class: 'code'.
-    self observeWrapper
+    self observeWrapper.
     wrapper with: [code := html textarea].
     self setEditorOn: code element.
 ! !
 
 HLWidget subclass: #HLWorkspace
-	instanceVariableNames: 'model code'
+	instanceVariableNames: 'model codeWidget'
 	package: 'Helios-Workspace'!
 
 !HLWorkspace methodsFor: 'accessing'!
 
-code
-
-	^ code ifNil:[self initializeCode]
+codeWidget
+	^ codeWidget ifNil: [
+		codeWidget := HLCodeWidget new
+    		model: self model code;
+        	yourself ]
 !
 
 model
-
-	^ model ifNil:[self initializeModel]
+	^ model ifNil: [ 
+    	self model: HLWorkspaceModel new.
+		model ]
 !
 
 model: aModel
-
 	model := aModel.
      
-    self code model: aModel code.
-    self observeCode.
+    self codeWidget model: aModel code.
+    self observeCodeWidget.
 ! !
 
 !HLWorkspace methodsFor: 'actions'!
 
-ensureModel
-	"Sends the #model: initialization message if needed."
-
-	model ifNil:[
-		self model: self model]
-!
-
-makeCode
-
-	^ HLCodeWidget new
-    	model: model code;
-        yourself
-!
-
-observeCode
-! !
-
-!HLWorkspace methodsFor: 'initialization'!
-
-initializeCode
-
-	^ code := self makeCode.
-!
-
-initializeModel
-
-	^ model := HLWorkspaceModel new
+observeCodeWidget
 ! !
 
 !HLWorkspace methodsFor: 'reactions'!
@@ -328,10 +304,7 @@ onPrintIt
 !HLWorkspace methodsFor: 'rendering'!
 
 renderContentOn: html
-
-	self ensureModel.
-    
-	html with: self code
+	html with: self codeWidget
 ! !
 
 !HLWorkspace class methodsFor: 'accessing'!
@@ -357,12 +330,12 @@ Object subclass: #HLWorkspaceModel
 !HLWorkspaceModel methodsFor: 'accessing'!
 
 announcer
-	^ announcer ifNil: [ self initializeAnnouncer ]
+	^ announcer ifNil: [ announcer := Announcer new ]
 !
 
 code
 	"Answers the code model working for this workspace model"
-	^ code ifNil:[self initializeCode]
+	^ code ifNil:[ HLCodeModel on: self environment ]
 !
 
 environment
@@ -379,17 +352,6 @@ subscribe: aWidget
 	aWidget subscribeTo: self announcer
 ! !
 
-!HLWorkspaceModel methodsFor: 'initialization'!
-
-initializeAnnouncer
-	^ announcer := Announcer new
-!
-
-initializeCode
-
-	^ code := HLCodeModel on: self environment
-! !
-
 !HLWorkspaceModel methodsFor: 'reactions'!
 
 onKeyDown: anEvent

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor