Browse Source

- better documentation widget
- inspectors are refreshed automatically

Nicolas Petton 11 years ago
parent
commit
a263522fc3

+ 18 - 1
css/helios.css

@@ -362,6 +362,24 @@ i {
     margin-left: 5px;
 }
 
+.tool_container .panes .pane .pane_actions label {
+    display: inline-block;
+    padding-left: 30px;
+    font-size: 11px;
+    line-height: 16px;
+    vertical-align: top;
+    text-shadow: #ddd 0px 1px 0px; 
+    color: #222;
+
+}
+
+.tool_container .panes .pane .pane_actions label input {
+    float: none;
+    vertical-align: top;
+    margin-top: 2px;
+    margin-right: 5px;
+}
+
 .tool_container .panes .pane .pane_actions .btn {
     background: transparent;
     border: 0;
@@ -611,7 +629,6 @@ i {
 .doc code {
     padding: 1px 4px;
 }
-
 .doc .head {
     background: #08C;
     padding: 10px;

+ 70 - 102
js/Helios-Browser.deploy.js

@@ -275,7 +275,7 @@ messageSends: []}),
 smalltalk.HLBrowser.klass);
 
 
-smalltalk.addClass('HLBrowserBottomWidget', smalltalk.HLWidget, ['model', 'codeWidget', 'documentationWidget', 'selectedWidget'], 'Helios-Browser');
+smalltalk.addClass('HLBrowserBottomWidget', smalltalk.HLWidget, ['model', 'codeWidget', 'documentationWidget'], 'Helios-Browser');
 smalltalk.addMethod(
 smalltalk.method({
 selector: "canHaveFocus",
@@ -339,9 +339,9 @@ selector: "focus",
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(self)._selectedWidget())._focus();
+_st(_st(self)._codeWidget())._focus();
 return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLBrowserBottomWidget)})},
-messageSends: ["focus", "selectedWidget"]}),
+messageSends: ["focus", "codeWidget"]}),
 smalltalk.HLBrowserBottomWidget);
 
 smalltalk.addMethod(
@@ -391,9 +391,9 @@ selector: "onShowCommentToggled",
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(self)._selectWidget_(_st(self)._documentationWidget());
+_st(self)._refresh();
 return self}, function($ctx1) {$ctx1.fill(self,"onShowCommentToggled",{},smalltalk.HLBrowserBottomWidget)})},
-messageSends: ["selectWidget:", "documentationWidget"]}),
+messageSends: ["refresh"]}),
 smalltalk.HLBrowserBottomWidget);
 
 smalltalk.addMethod(
@@ -402,9 +402,9 @@ selector: "onShowInstanceToggled",
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(self)._selectWidget_(_st(self)._codeWidget());
+_st(self)._refresh();
 return self}, function($ctx1) {$ctx1.fill(self,"onShowInstanceToggled",{},smalltalk.HLBrowserBottomWidget)})},
-messageSends: ["selectWidget:", "codeWidget"]}),
+messageSends: ["refresh"]}),
 smalltalk.HLBrowserBottomWidget);
 
 smalltalk.addMethod(
@@ -433,40 +433,27 @@ selector: "renderContentOn:",
 fn: function (html){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(html)._with_(_st(self)._selectedWidget());
+var $1;
+$1=_st(_st(self)._model())._showComment();
+if(smalltalk.assert($1)){
+_st(self)._renderPanesOn_(html);
+} else {
+_st(html)._with_(_st(self)._codeWidget());
+};
 return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLBrowserBottomWidget)})},
-messageSends: ["with:", "selectedWidget"]}),
+messageSends: ["ifTrue:ifFalse:", "renderPanesOn:", "with:", "codeWidget", "showComment", "model"]}),
 smalltalk.HLBrowserBottomWidget);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "selectWidget:",
-fn: function (aWidget){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self["@selectedWidget"]=aWidget;
-_st(self)._refresh();
-return self}, function($ctx1) {$ctx1.fill(self,"selectWidget:",{aWidget:aWidget},smalltalk.HLBrowserBottomWidget)})},
-messageSends: ["refresh"]}),
-smalltalk.HLBrowserBottomWidget);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "selectedWidget",
-fn: function (){
+selector: "renderPanesOn:",
+fn: function (html){
 var self=this;
+function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=self["@selectedWidget"];
-if(($receiver = $2) == nil || $receiver == undefined){
-self["@selectedWidget"]=_st(self)._codeWidget();
-$1=self["@selectedWidget"];
-} else {
-$1=$2;
-};
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"selectedWidget",{},smalltalk.HLBrowserBottomWidget)})},
-messageSends: ["ifNil:", "codeWidget"]}),
+_st(html)._with_(_st($HLVerticalSplitter())._with_with_(_st(self)._codeWidget(),_st(self)._documentationWidget()));
+return self}, function($ctx1) {$ctx1.fill(self,"renderPanesOn:",{html:html},smalltalk.HLBrowserBottomWidget)})},
+messageSends: ["with:", "with:with:", "codeWidget", "documentationWidget"]}),
 smalltalk.HLBrowserBottomWidget);
 
 
@@ -568,14 +555,10 @@ fn: function (aBoolean){
 var self=this;
 function $HLShowCommentToggled(){return smalltalk.HLShowCommentToggled||(typeof HLShowCommentToggled=="undefined"?nil:HLShowCommentToggled)}
 return smalltalk.withContext(function($ctx1) { 
-_st(self)._withChangesDo_((function(){
-return smalltalk.withContext(function($ctx2) {
 self["@showComment"]=aBoolean;
-self["@showComment"];
-return _st(_st(self)._announcer())._announce_(_st($HLShowCommentToggled())._new());
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+_st(_st(self)._announcer())._announce_(_st($HLShowCommentToggled())._new());
 return self}, function($ctx1) {$ctx1.fill(self,"showComment:",{aBoolean:aBoolean},smalltalk.HLBrowserModel)})},
-messageSends: ["withChangesDo:", "announce:", "new", "announcer"]}),
+messageSends: ["announce:", "new", "announcer"]}),
 smalltalk.HLBrowserModel);
 
 smalltalk.addMethod(
@@ -608,8 +591,6 @@ _st(self)._withChangesDo_((function(){
 return smalltalk.withContext(function($ctx2) {
 self["@showInstance"]=aBoolean;
 self["@showInstance"];
-self["@showComment"]=false;
-self["@showComment"];
 $1=_st(self)._selectedClass();
 if(($receiver = $1) == nil || $receiver == undefined){
 $1;
@@ -1186,9 +1167,10 @@ smalltalk.method({
 selector: "renderButtonsOn:",
 fn: function (html){
 var self=this;
+var checkbox;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$4,$5,$6,$7,$8,$9,$10,$11,$2;
+var $1,$3,$4,$5,$6,$7,$8,$2,$9,$11,$12,$10,$13;
 $1=_st(html)._div();
 _st($1)._class_("btn-group");
 $2=_st($1)._with_((function(){
@@ -1222,25 +1204,28 @@ $8=_st($6)._onClick_((function(){
 return smalltalk.withContext(function($ctx3) {
 return _st(self)._showInstance_(false);
 }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
-$8;
-$9=_st(html)._button();
-_st($9)._class_(_st($String())._streamContents_((function(str){
-return smalltalk.withContext(function($ctx3) {
-_st(str)._nextPutAll_("btn");
-$10=_st(self)._showComment();
-if(smalltalk.assert($10)){
-return _st(str)._nextPutAll_(" active");
-};
-}, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
-_st($9)._with_("Doc");
-$11=_st($9)._onClick_((function(){
+return $8;
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+$9=_st(html)._label();
+_st($9)._class_("checkbox");
+$10=_st($9)._with_((function(){
+return smalltalk.withContext(function($ctx2) {
+$11=_st(html)._input();
+_st($11)._type_("checkbox");
+$12=_st($11)._onClick_((function(){
 return smalltalk.withContext(function($ctx3) {
-return _st(self)._showComment_(true);
+return _st(self)._toggleShowComment();
 }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
-return $11;
+checkbox=$12;
+checkbox;
+return _st(html)._with_("Doc");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLClassesListWidget)})},
-messageSends: ["class:", "div", "with:", "streamContents:", "nextPutAll:", "ifTrue:", "showInstance", "button", "onClick:", "showInstance:", "showClass", "showComment", "showComment:"]}),
+$13=_st(self)._showComment();
+if(smalltalk.assert($13)){
+_st(checkbox)._at_put_("checked","checked");
+};
+return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html,checkbox:checkbox},smalltalk.HLClassesListWidget)})},
+messageSends: ["class:", "div", "with:", "streamContents:", "nextPutAll:", "ifTrue:", "showInstance", "button", "onClick:", "showInstance:", "showClass", "label", "type:", "input", "toggleShowComment", "at:put:", "showComment"]}),
 smalltalk.HLClassesListWidget);
 
 smalltalk.addMethod(
@@ -1391,13 +1376,10 @@ fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-$1=_st(_st(_st(_st(self)._model())._showInstance())._not())._and_((function(){
-return smalltalk.withContext(function($ctx2) {
-return _st(_st(_st(self)._model())._showComment())._not();
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+$1=_st(_st(_st(self)._model())._showInstance())._not();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"showClass",{},smalltalk.HLClassesListWidget)})},
-messageSends: ["and:", "not", "showComment", "model", "showInstance"]}),
+messageSends: ["not", "showInstance", "model"]}),
 smalltalk.HLClassesListWidget);
 
 smalltalk.addMethod(
@@ -1431,13 +1413,10 @@ fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-$1=_st(_st(_st(self)._model())._showInstance())._and_((function(){
-return smalltalk.withContext(function($ctx2) {
-return _st(_st(_st(self)._model())._showComment())._not();
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+$1=_st(_st(self)._model())._showInstance();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"showInstance",{},smalltalk.HLClassesListWidget)})},
-messageSends: ["and:", "not", "showComment", "model", "showInstance"]}),
+messageSends: ["showInstance", "model"]}),
 smalltalk.HLClassesListWidget);
 
 smalltalk.addMethod(
@@ -1451,6 +1430,17 @@ return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolea
 messageSends: ["showInstance:", "model"]}),
 smalltalk.HLClassesListWidget);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "toggleShowComment",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._model())._showComment_(_st(_st(self)._showComment())._not());
+return self}, function($ctx1) {$ctx1.fill(self,"toggleShowComment",{},smalltalk.HLClassesListWidget)})},
+messageSends: ["showComment:", "not", "showComment", "model"]}),
+smalltalk.HLClassesListWidget);
+
 
 
 smalltalk.addClass('HLDocumentationWidget', smalltalk.HLFocusableWidget, ['model'], 'Helios-Browser');
@@ -2458,7 +2448,6 @@ fn: function (){
 var self=this;
 function $HLClassSelected(){return smalltalk.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
 function $HLShowInstanceToggled(){return smalltalk.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
-function $HLShowCommentToggled(){return smalltalk.HLShowCommentToggled||(typeof HLShowCommentToggled=="undefined"?nil:HLShowCommentToggled)}
 function $HLProtocolSelected(){return smalltalk.HLProtocolSelected||(typeof HLProtocolSelected=="undefined"?nil:HLProtocolSelected)}
 function $HLProtocolsFocusRequested(){return smalltalk.HLProtocolsFocusRequested||(typeof HLProtocolsFocusRequested=="undefined"?nil:HLProtocolsFocusRequested)}
 return smalltalk.withContext(function($ctx1) { 
@@ -2466,7 +2455,6 @@ var $1,$2;
 $1=_st(_st(self)._model())._announcer();
 _st($1)._on_send_to_($HLClassSelected(),"onClassSelected:",self);
 _st($1)._on_send_to_($HLShowInstanceToggled(),"onClassSelected:",self);
-_st($1)._on_send_to_($HLShowCommentToggled(),"onShowCommentToggled",self);
 _st($1)._on_send_to_($HLProtocolSelected(),"onProtocolSelected:",self);
 $2=_st($1)._on_send_to_($HLProtocolsFocusRequested(),"onProtocolsFocusRequested",self);
 return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLProtocolsListWidget)})},
@@ -2589,21 +2577,6 @@ return self}, function($ctx1) {$ctx1.fill(self,"onProtocolsFocusRequested",{},sm
 messageSends: ["focus"]}),
 smalltalk.HLProtocolsListWidget);
 
-smalltalk.addMethod(
-smalltalk.method({
-selector: "onShowCommentToggled",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=self;
-_st($1)._selectItem_(nil);
-_st($1)._setItemsForSelectedClass();
-$2=_st($1)._refresh();
-return self}, function($ctx1) {$ctx1.fill(self,"onShowCommentToggled",{},smalltalk.HLProtocolsListWidget)})},
-messageSends: ["selectItem:", "setItemsForSelectedClass", "refresh"]}),
-smalltalk.HLProtocolsListWidget);
-
 smalltalk.addMethod(
 smalltalk.method({
 selector: "renderContentOn:",
@@ -2658,25 +2631,20 @@ fn: function (aClass){
 var self=this;
 function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$5,$6,$7,$4;
-$1=_st(_st(self)._model())._showComment();
-if(smalltalk.assert($1)){
-$2=_st(self)._items_([]);
-return $2;
-};
-$3=self;
-$5=aClass;
-if(($receiver = $5) == nil || $receiver == undefined){
-$4=_st($Array())._with_(_st(self)._allProtocol());
+var $1,$3,$4,$5,$2;
+$1=self;
+$3=aClass;
+if(($receiver = $3) == nil || $receiver == undefined){
+$2=_st($Array())._with_(_st(self)._allProtocol());
 } else {
-$6=_st($Array())._with_(_st(self)._allProtocol());
-_st($6)._addAll_(_st(aClass)._protocols());
-$7=_st($6)._yourself();
-$4=$7;
+$4=_st($Array())._with_(_st(self)._allProtocol());
+_st($4)._addAll_(_st(aClass)._protocols());
+$5=_st($4)._yourself();
+$2=$5;
 };
-_st($3)._items_($4);
+_st($1)._items_($2);
 return self}, function($ctx1) {$ctx1.fill(self,"setItemsForClass:",{aClass:aClass},smalltalk.HLProtocolsListWidget)})},
-messageSends: ["ifTrue:", "items:", "showComment", "model", "ifNil:ifNotNil:", "with:", "allProtocol", "addAll:", "protocols", "yourself"]}),
+messageSends: ["items:", "ifNil:ifNotNil:", "with:", "allProtocol", "addAll:", "protocols", "yourself"]}),
 smalltalk.HLProtocolsListWidget);
 
 smalltalk.addMethod(

+ 94 - 131
js/Helios-Browser.js

@@ -360,7 +360,7 @@ referencedClasses: []
 smalltalk.HLBrowser.klass);
 
 
-smalltalk.addClass('HLBrowserBottomWidget', smalltalk.HLWidget, ['model', 'codeWidget', 'documentationWidget', 'selectedWidget'], 'Helios-Browser');
+smalltalk.addClass('HLBrowserBottomWidget', smalltalk.HLWidget, ['model', 'codeWidget', 'documentationWidget'], 'Helios-Browser');
 smalltalk.addMethod(
 smalltalk.method({
 selector: "canHaveFocus",
@@ -440,11 +440,11 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(self)._selectedWidget())._focus();
+_st(_st(self)._codeWidget())._focus();
 return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLBrowserBottomWidget)})},
 args: [],
-source: "focus\x0a\x09self selectedWidget focus",
-messageSends: ["focus", "selectedWidget"],
+source: "focus\x0a\x09self codeWidget focus",
+messageSends: ["focus", "codeWidget"],
 referencedClasses: []
 }),
 smalltalk.HLBrowserBottomWidget);
@@ -512,11 +512,11 @@ category: 'reactions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(self)._selectWidget_(_st(self)._documentationWidget());
+_st(self)._refresh();
 return self}, function($ctx1) {$ctx1.fill(self,"onShowCommentToggled",{},smalltalk.HLBrowserBottomWidget)})},
 args: [],
-source: "onShowCommentToggled\x0a\x09self selectWidget: self documentationWidget",
-messageSends: ["selectWidget:", "documentationWidget"],
+source: "onShowCommentToggled\x0a\x09self refresh",
+messageSends: ["refresh"],
 referencedClasses: []
 }),
 smalltalk.HLBrowserBottomWidget);
@@ -528,11 +528,11 @@ category: 'reactions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(self)._selectWidget_(_st(self)._codeWidget());
+_st(self)._refresh();
 return self}, function($ctx1) {$ctx1.fill(self,"onShowInstanceToggled",{},smalltalk.HLBrowserBottomWidget)})},
 args: [],
-source: "onShowInstanceToggled\x0a\x09self selectWidget: self codeWidget",
-messageSends: ["selectWidget:", "codeWidget"],
+source: "onShowInstanceToggled\x0a\x09self refresh",
+messageSends: ["refresh"],
 referencedClasses: []
 }),
 smalltalk.HLBrowserBottomWidget);
@@ -574,53 +574,35 @@ category: 'rendering',
 fn: function (html){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(html)._with_(_st(self)._selectedWidget());
+var $1;
+$1=_st(_st(self)._model())._showComment();
+if(smalltalk.assert($1)){
+_st(self)._renderPanesOn_(html);
+} else {
+_st(html)._with_(_st(self)._codeWidget());
+};
 return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLBrowserBottomWidget)})},
 args: ["html"],
-source: "renderContentOn: html\x0a\x09html with: self selectedWidget",
-messageSends: ["with:", "selectedWidget"],
+source: "renderContentOn: html\x0a\x09self model showComment \x0a\x09\x09ifTrue: [ self renderPanesOn: html ]\x0a\x09\x09ifFalse: [ html with: self codeWidget ]",
+messageSends: ["ifTrue:ifFalse:", "renderPanesOn:", "with:", "codeWidget", "showComment", "model"],
 referencedClasses: []
 }),
 smalltalk.HLBrowserBottomWidget);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "selectWidget:",
-category: 'actions',
-fn: function (aWidget){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self["@selectedWidget"]=aWidget;
-_st(self)._refresh();
-return self}, function($ctx1) {$ctx1.fill(self,"selectWidget:",{aWidget:aWidget},smalltalk.HLBrowserBottomWidget)})},
-args: ["aWidget"],
-source: "selectWidget: aWidget\x0a\x09selectedWidget := aWidget.\x0a\x09self refresh",
-messageSends: ["refresh"],
-referencedClasses: []
-}),
-smalltalk.HLBrowserBottomWidget);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "selectedWidget",
-category: 'accessing',
-fn: function (){
+selector: "renderPanesOn:",
+category: 'rendering',
+fn: function (html){
 var self=this;
+function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=self["@selectedWidget"];
-if(($receiver = $2) == nil || $receiver == undefined){
-self["@selectedWidget"]=_st(self)._codeWidget();
-$1=self["@selectedWidget"];
-} else {
-$1=$2;
-};
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"selectedWidget",{},smalltalk.HLBrowserBottomWidget)})},
-args: [],
-source: "selectedWidget\x0a\x09^ selectedWidget ifNil: [ selectedWidget := self codeWidget ]",
-messageSends: ["ifNil:", "codeWidget"],
-referencedClasses: []
+_st(html)._with_(_st($HLVerticalSplitter())._with_with_(_st(self)._codeWidget(),_st(self)._documentationWidget()));
+return self}, function($ctx1) {$ctx1.fill(self,"renderPanesOn:",{html:html},smalltalk.HLBrowserBottomWidget)})},
+args: ["html"],
+source: "renderPanesOn: html\x0a\x09html with: (HLVerticalSplitter\x0a\x09\x09with: self codeWidget\x0a\x09\x09with: self documentationWidget)",
+messageSends: ["with:", "with:with:", "codeWidget", "documentationWidget"],
+referencedClasses: ["HLVerticalSplitter"]
 }),
 smalltalk.HLBrowserBottomWidget);
 
@@ -759,16 +741,12 @@ fn: function (aBoolean){
 var self=this;
 function $HLShowCommentToggled(){return smalltalk.HLShowCommentToggled||(typeof HLShowCommentToggled=="undefined"?nil:HLShowCommentToggled)}
 return smalltalk.withContext(function($ctx1) { 
-_st(self)._withChangesDo_((function(){
-return smalltalk.withContext(function($ctx2) {
 self["@showComment"]=aBoolean;
-self["@showComment"];
-return _st(_st(self)._announcer())._announce_(_st($HLShowCommentToggled())._new());
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+_st(_st(self)._announcer())._announce_(_st($HLShowCommentToggled())._new());
 return self}, function($ctx1) {$ctx1.fill(self,"showComment:",{aBoolean:aBoolean},smalltalk.HLBrowserModel)})},
 args: ["aBoolean"],
-source: "showComment: aBoolean\x0a\x09self withChangesDo: [\x0a\x09\x09showComment := aBoolean.\x0a\x09\x09self announcer announce: HLShowCommentToggled new ]",
-messageSends: ["withChangesDo:", "announce:", "new", "announcer"],
+source: "showComment: aBoolean\x0a\x09showComment := aBoolean.\x0a\x09self announcer announce: HLShowCommentToggled new",
+messageSends: ["announce:", "new", "announcer"],
 referencedClasses: ["HLShowCommentToggled"]
 }),
 smalltalk.HLBrowserModel);
@@ -809,8 +787,6 @@ _st(self)._withChangesDo_((function(){
 return smalltalk.withContext(function($ctx2) {
 self["@showInstance"]=aBoolean;
 self["@showInstance"];
-self["@showComment"]=false;
-self["@showComment"];
 $1=_st(self)._selectedClass();
 if(($receiver = $1) == nil || $receiver == undefined){
 $1;
@@ -828,7 +804,7 @@ return _st(_st(self)._announcer())._announce_(_st($HLShowInstanceToggled())._new
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean},smalltalk.HLBrowserModel)})},
 args: ["aBoolean"],
-source: "showInstance: aBoolean\x0a\x0a\x09self withChangesDo: [\x0a\x09\x09showInstance := aBoolean.\x0a\x09\x09showComment := false.\x0a\x0a    \x09self selectedClass ifNotNil: [\x0a    \x09\x09self selectedClass: (aBoolean\x0a    \x09\x09\x09ifTrue: [self selectedClass theNonMetaClass ]\x0a\x09    \x09  \x09ifFalse: [ self selectedClass theMetaClass ]) ].\x0a    \x0a\x09\x09self announcer announce: HLShowInstanceToggled new ] ",
+source: "showInstance: aBoolean\x0a\x0a\x09self withChangesDo: [\x0a\x09\x09showInstance := aBoolean.\x0a\x0a    \x09self selectedClass ifNotNil: [\x0a    \x09\x09self selectedClass: (aBoolean\x0a    \x09\x09\x09ifTrue: [self selectedClass theNonMetaClass ]\x0a\x09    \x09  \x09ifFalse: [ self selectedClass theMetaClass ]) ].\x0a    \x0a\x09\x09self announcer announce: HLShowInstanceToggled new ] ",
 messageSends: ["withChangesDo:", "ifNotNil:", "selectedClass:", "ifTrue:ifFalse:", "theNonMetaClass", "selectedClass", "theMetaClass", "announce:", "new", "announcer"],
 referencedClasses: ["HLShowInstanceToggled"]
 }),
@@ -1552,9 +1528,10 @@ selector: "renderButtonsOn:",
 category: 'rendering',
 fn: function (html){
 var self=this;
+var checkbox;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$4,$5,$6,$7,$8,$9,$10,$11,$2;
+var $1,$3,$4,$5,$6,$7,$8,$2,$9,$11,$12,$10,$13;
 $1=_st(html)._div();
 _st($1)._class_("btn-group");
 $2=_st($1)._with_((function(){
@@ -1588,27 +1565,30 @@ $8=_st($6)._onClick_((function(){
 return smalltalk.withContext(function($ctx3) {
 return _st(self)._showInstance_(false);
 }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
-$8;
-$9=_st(html)._button();
-_st($9)._class_(_st($String())._streamContents_((function(str){
-return smalltalk.withContext(function($ctx3) {
-_st(str)._nextPutAll_("btn");
-$10=_st(self)._showComment();
-if(smalltalk.assert($10)){
-return _st(str)._nextPutAll_(" active");
-};
-}, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
-_st($9)._with_("Doc");
-$11=_st($9)._onClick_((function(){
+return $8;
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+$9=_st(html)._label();
+_st($9)._class_("checkbox");
+$10=_st($9)._with_((function(){
+return smalltalk.withContext(function($ctx2) {
+$11=_st(html)._input();
+_st($11)._type_("checkbox");
+$12=_st($11)._onClick_((function(){
 return smalltalk.withContext(function($ctx3) {
-return _st(self)._showComment_(true);
+return _st(self)._toggleShowComment();
 }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
-return $11;
+checkbox=$12;
+checkbox;
+return _st(html)._with_("Doc");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLClassesListWidget)})},
+$13=_st(self)._showComment();
+if(smalltalk.assert($13)){
+_st(checkbox)._at_put_("checked","checked");
+};
+return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html,checkbox:checkbox},smalltalk.HLClassesListWidget)})},
 args: ["html"],
-source: "renderButtonsOn: html\x0a\x09html div \x0a        class: 'btn-group';\x0a\x09\x09with: [ \x0a           \x09html button \x0a                class: (String streamContents: [ :str |\x0a                \x09str nextPutAll: 'btn'.\x0a                    self showInstance ifTrue: [ \x0a                    \x09str nextPutAll: ' active' ] ]);\x0a  \x09\x09\x09\x09with: 'Instance';\x0a                onClick: [ self showInstance: true ].\x0a  \x09\x09\x09html button\x0a  \x09\x09\x09\x09class: (String streamContents: [ :str |\x0a                \x09str nextPutAll: 'btn'.\x0a                    self showClass ifTrue: [ \x0a                    \x09str nextPutAll: ' active' ] ]);\x0a  \x09\x09\x09\x09with: 'Class';\x0a\x09\x09\x09\x09onClick: [ self showInstance: false ].\x0a\x09\x09\x09html button\x0a  \x09\x09\x09\x09class: (String streamContents: [ :str |\x0a                \x09str nextPutAll: 'btn'.\x0a                    self showComment ifTrue: [ \x0a                    \x09str nextPutAll: ' active' ] ]);\x0a  \x09\x09\x09\x09with: 'Doc';\x0a\x09\x09\x09\x09onClick: [ self showComment: true ] ]",
-messageSends: ["class:", "div", "with:", "streamContents:", "nextPutAll:", "ifTrue:", "showInstance", "button", "onClick:", "showInstance:", "showClass", "showComment", "showComment:"],
+source: "renderButtonsOn: html\x0a\x09| checkbox |\x0a\x09\x0a\x09html div \x0a        class: 'btn-group';\x0a\x09\x09with: [ \x0a           \x09html button \x0a                class: (String streamContents: [ :str |\x0a                \x09str nextPutAll: 'btn'.\x0a                    self showInstance ifTrue: [ \x0a                    \x09str nextPutAll: ' active' ] ]);\x0a  \x09\x09\x09\x09with: 'Instance';\x0a                onClick: [ self showInstance: true ].\x0a  \x09\x09\x09html button\x0a  \x09\x09\x09\x09class: (String streamContents: [ :str |\x0a                \x09str nextPutAll: 'btn'.\x0a                    self showClass ifTrue: [ \x0a                    \x09str nextPutAll: ' active' ] ]);\x0a  \x09\x09\x09\x09with: 'Class';\x0a\x09\x09\x09\x09onClick: [ self showInstance: false ] ].\x0a\x09\x09html label \x0a\x09\x09\x09class: 'checkbox';\x0a\x09\x09\x09with: [\x0a\x09\x09\x09\x09checkbox := html input\x0a\x09\x09\x09\x09\x09type: 'checkbox';\x0a\x09\x09\x09\x09\x09onClick: [ self toggleShowComment ].\x0a\x09\x09\x09\x09html with: 'Doc' ].\x0a\x09\x09\x09\x09\x0a\x09\x09self showComment ifTrue: [\x0a\x09\x09\x09checkbox at: 'checked' put: 'checked' ]",
+messageSends: ["class:", "div", "with:", "streamContents:", "nextPutAll:", "ifTrue:", "showInstance", "button", "onClick:", "showInstance:", "showClass", "label", "type:", "input", "toggleShowComment", "at:put:", "showComment"],
 referencedClasses: ["String"]
 }),
 smalltalk.HLClassesListWidget);
@@ -1797,20 +1777,17 @@ smalltalk.HLClassesListWidget);
 smalltalk.addMethod(
 smalltalk.method({
 selector: "showClass",
-category: 'accessing',
+category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-$1=_st(_st(_st(_st(self)._model())._showInstance())._not())._and_((function(){
-return smalltalk.withContext(function($ctx2) {
-return _st(_st(_st(self)._model())._showComment())._not();
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+$1=_st(_st(_st(self)._model())._showInstance())._not();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"showClass",{},smalltalk.HLClassesListWidget)})},
 args: [],
-source: "showClass\x0a\x09^ self model showInstance not and: [\x0a\x09\x09self model showComment not ]",
-messageSends: ["and:", "not", "showComment", "model", "showInstance"],
+source: "showClass\x0a\x09^ self model showInstance not",
+messageSends: ["not", "showInstance", "model"],
 referencedClasses: []
 }),
 smalltalk.HLClassesListWidget);
@@ -1818,7 +1795,7 @@ smalltalk.HLClassesListWidget);
 smalltalk.addMethod(
 smalltalk.method({
 selector: "showComment",
-category: 'accessing',
+category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
@@ -1852,20 +1829,17 @@ smalltalk.HLClassesListWidget);
 smalltalk.addMethod(
 smalltalk.method({
 selector: "showInstance",
-category: 'accessing',
+category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-$1=_st(_st(_st(self)._model())._showInstance())._and_((function(){
-return smalltalk.withContext(function($ctx2) {
-return _st(_st(_st(self)._model())._showComment())._not();
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+$1=_st(_st(self)._model())._showInstance();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"showInstance",{},smalltalk.HLClassesListWidget)})},
 args: [],
-source: "showInstance\x0a\x09^ self model showInstance and: [\x0a\x09\x09self model showComment not ]",
-messageSends: ["and:", "not", "showComment", "model", "showInstance"],
+source: "showInstance\x0a\x09^ self model showInstance",
+messageSends: ["showInstance", "model"],
 referencedClasses: []
 }),
 smalltalk.HLClassesListWidget);
@@ -1886,6 +1860,22 @@ referencedClasses: []
 }),
 smalltalk.HLClassesListWidget);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "toggleShowComment",
+category: 'actions',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._model())._showComment_(_st(_st(self)._showComment())._not());
+return self}, function($ctx1) {$ctx1.fill(self,"toggleShowComment",{},smalltalk.HLClassesListWidget)})},
+args: [],
+source: "toggleShowComment\x0a\x09self model showComment: self showComment not",
+messageSends: ["showComment:", "not", "showComment", "model"],
+referencedClasses: []
+}),
+smalltalk.HLClassesListWidget);
+
 
 
 smalltalk.addClass('HLDocumentationWidget', smalltalk.HLFocusableWidget, ['model'], 'Helios-Browser');
@@ -3189,7 +3179,6 @@ fn: function (){
 var self=this;
 function $HLClassSelected(){return smalltalk.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
 function $HLShowInstanceToggled(){return smalltalk.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
-function $HLShowCommentToggled(){return smalltalk.HLShowCommentToggled||(typeof HLShowCommentToggled=="undefined"?nil:HLShowCommentToggled)}
 function $HLProtocolSelected(){return smalltalk.HLProtocolSelected||(typeof HLProtocolSelected=="undefined"?nil:HLProtocolSelected)}
 function $HLProtocolsFocusRequested(){return smalltalk.HLProtocolsFocusRequested||(typeof HLProtocolsFocusRequested=="undefined"?nil:HLProtocolsFocusRequested)}
 return smalltalk.withContext(function($ctx1) { 
@@ -3197,14 +3186,13 @@ var $1,$2;
 $1=_st(_st(self)._model())._announcer();
 _st($1)._on_send_to_($HLClassSelected(),"onClassSelected:",self);
 _st($1)._on_send_to_($HLShowInstanceToggled(),"onClassSelected:",self);
-_st($1)._on_send_to_($HLShowCommentToggled(),"onShowCommentToggled",self);
 _st($1)._on_send_to_($HLProtocolSelected(),"onProtocolSelected:",self);
 $2=_st($1)._on_send_to_($HLProtocolsFocusRequested(),"onProtocolsFocusRequested",self);
 return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLProtocolsListWidget)})},
 args: [],
-source: "observeModel\x0a    self model announcer \x0a\x09\x09on: HLClassSelected\x0a\x09\x09send: #onClassSelected:\x0a\x09\x09to: self;\x0a\x09\x09\x0a    \x09on: HLShowInstanceToggled \x0a\x09\x09send: #onClassSelected:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLShowCommentToggled \x0a\x09\x09send: #onShowCommentToggled\x0a\x09\x09to: self;\x0a\x09\x09\x0a    \x09on: HLProtocolSelected\x0a\x09\x09send: #onProtocolSelected:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLProtocolsFocusRequested \x0a\x09\x09send: #onProtocolsFocusRequested\x0a\x09\x09to: self",
+source: "observeModel\x0a    self model announcer \x0a\x09\x09on: HLClassSelected\x0a\x09\x09send: #onClassSelected:\x0a\x09\x09to: self;\x0a\x09\x09\x0a    \x09on: HLShowInstanceToggled \x0a\x09\x09send: #onClassSelected:\x0a\x09\x09to: self;\x0a\x09\x09\x0a    \x09on: HLProtocolSelected\x0a\x09\x09send: #onProtocolSelected:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLProtocolsFocusRequested \x0a\x09\x09send: #onProtocolsFocusRequested\x0a\x09\x09to: self",
 messageSends: ["on:send:to:", "announcer", "model"],
-referencedClasses: ["HLClassSelected", "HLShowInstanceToggled", "HLShowCommentToggled", "HLProtocolSelected", "HLProtocolsFocusRequested"]
+referencedClasses: ["HLClassSelected", "HLShowInstanceToggled", "HLProtocolSelected", "HLProtocolsFocusRequested"]
 }),
 smalltalk.HLProtocolsListWidget);
 
@@ -3354,26 +3342,6 @@ referencedClasses: []
 }),
 smalltalk.HLProtocolsListWidget);
 
-smalltalk.addMethod(
-smalltalk.method({
-selector: "onShowCommentToggled",
-category: 'reactions',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=self;
-_st($1)._selectItem_(nil);
-_st($1)._setItemsForSelectedClass();
-$2=_st($1)._refresh();
-return self}, function($ctx1) {$ctx1.fill(self,"onShowCommentToggled",{},smalltalk.HLProtocolsListWidget)})},
-args: [],
-source: "onShowCommentToggled\x0a\x09self \x0a\x09\x09selectItem: nil;\x0a\x09\x09setItemsForSelectedClass;\x0a    \x09refresh",
-messageSends: ["selectItem:", "setItemsForSelectedClass", "refresh"],
-referencedClasses: []
-}),
-smalltalk.HLProtocolsListWidget);
-
 smalltalk.addMethod(
 smalltalk.method({
 selector: "renderContentOn:",
@@ -3444,27 +3412,22 @@ fn: function (aClass){
 var self=this;
 function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$5,$6,$7,$4;
-$1=_st(_st(self)._model())._showComment();
-if(smalltalk.assert($1)){
-$2=_st(self)._items_([]);
-return $2;
-};
-$3=self;
-$5=aClass;
-if(($receiver = $5) == nil || $receiver == undefined){
-$4=_st($Array())._with_(_st(self)._allProtocol());
+var $1,$3,$4,$5,$2;
+$1=self;
+$3=aClass;
+if(($receiver = $3) == nil || $receiver == undefined){
+$2=_st($Array())._with_(_st(self)._allProtocol());
 } else {
-$6=_st($Array())._with_(_st(self)._allProtocol());
-_st($6)._addAll_(_st(aClass)._protocols());
-$7=_st($6)._yourself();
-$4=$7;
+$4=_st($Array())._with_(_st(self)._allProtocol());
+_st($4)._addAll_(_st(aClass)._protocols());
+$5=_st($4)._yourself();
+$2=$5;
 };
-_st($3)._items_($4);
+_st($1)._items_($2);
 return self}, function($ctx1) {$ctx1.fill(self,"setItemsForClass:",{aClass:aClass},smalltalk.HLProtocolsListWidget)})},
 args: ["aClass"],
-source: "setItemsForClass: aClass\x0a\x09self model showComment ifTrue: [\x0a\x09\x09^ self items: #() ].\x0a\x09\x09\x0a\x09self items: (aClass\x0a    \x09ifNil: [ Array with: self allProtocol ]\x0a      \x09ifNotNil: [ \x0a        \x09(Array with: self allProtocol) \x0a            \x09addAll: aClass protocols; \x0a                yourself ])",
-messageSends: ["ifTrue:", "items:", "showComment", "model", "ifNil:ifNotNil:", "with:", "allProtocol", "addAll:", "protocols", "yourself"],
+source: "setItemsForClass: aClass\x0a\x09self items: (aClass\x0a    \x09ifNil: [ Array with: self allProtocol ]\x0a      \x09ifNotNil: [ \x0a        \x09(Array with: self allProtocol) \x0a            \x09addAll: aClass protocols; \x0a                yourself ])",
+messageSends: ["items:", "ifNil:ifNotNil:", "with:", "allProtocol", "addAll:", "protocols", "yourself"],
 referencedClasses: ["Array"]
 }),
 smalltalk.HLProtocolsListWidget);

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

@@ -265,9 +265,9 @@ selector: "execute",
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(self)._model())._showComment_(true);
+_st(_st(self)._model())._showComment_(_st(_st(_st(self)._model())._showComment())._not());
 return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLToggleClassCommentCommand)})},
-messageSends: ["showComment:", "model"]}),
+messageSends: ["showComment:", "not", "showComment", "model"]}),
 smalltalk.HLToggleClassCommentCommand);
 
 

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

@@ -371,11 +371,11 @@ category: 'executing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(self)._model())._showComment_(true);
+_st(_st(self)._model())._showComment_(_st(_st(_st(self)._model())._showComment())._not());
 return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLToggleClassCommentCommand)})},
 args: [],
-source: "execute\x0a\x09self model showComment: true",
-messageSends: ["showComment:", "model"],
+source: "execute\x0a\x09self model showComment: self model showComment not",
+messageSends: ["showComment:", "not", "showComment", "model"],
 referencedClasses: []
 }),
 smalltalk.HLToggleClassCommentCommand);

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

@@ -47,6 +47,18 @@ return $1;
 messageSends: ["ifNil:", "model:", "model", "new", "yourself"]}),
 smalltalk.HLInspector);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "initialize",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+smalltalk.HLWidget.fn.prototype._initialize.apply(_st(self), []);
+_st(self)._register();
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLInspector)})},
+messageSends: ["initialize", "register"]}),
+smalltalk.HLInspector);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "inspect:",
@@ -301,6 +313,17 @@ return self}, function($ctx1) {$ctx1.fill(self,"refreshVariablesWidget",{},small
 messageSends: ["refresh", "variablesWidget"]}),
 smalltalk.HLInspector);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "register",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._class())._register_(self);
+return self}, function($ctx1) {$ctx1.fill(self,"register",{},smalltalk.HLInspector)})},
+messageSends: ["register:", "class"]}),
+smalltalk.HLInspector);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "renderContentOn:",
@@ -349,6 +372,18 @@ return "Inspector";
 messageSends: []}),
 smalltalk.HLInspector);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "unregister",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+smalltalk.HLWidget.fn.prototype._unregister.apply(_st(self), []);
+_st(_st(self)._class())._unregister_(self);
+return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLInspector)})},
+messageSends: ["unregister", "unregister:", "class"]}),
+smalltalk.HLInspector);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "variablesWidget",
@@ -373,6 +408,7 @@ messageSends: ["ifNil:", "model:", "model", "new", "yourself"]}),
 smalltalk.HLInspector);
 
 
+smalltalk.HLInspector.klass.iVarNames = ['inspectors'];
 smalltalk.addMethod(
 smalltalk.method({
 selector: "canBeOpenAsTab",
@@ -384,6 +420,49 @@ return false;
 messageSends: []}),
 smalltalk.HLInspector.klass);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "initialize",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+smalltalk.HLWidget.klass.fn.prototype._initialize.apply(_st(self), []);
+_st(self)._watchChanges();
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLInspector.klass)})},
+messageSends: ["initialize", "watchChanges"]}),
+smalltalk.HLInspector.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "inspectors",
+fn: function (){
+var self=this;
+function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@inspectors"];
+if(($receiver = $2) == nil || $receiver == undefined){
+self["@inspectors"]=_st($OrderedCollection())._new();
+$1=self["@inspectors"];
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"inspectors",{},smalltalk.HLInspector.klass)})},
+messageSends: ["ifNil:", "new"]}),
+smalltalk.HLInspector.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "register:",
+fn: function (anInspector){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._inspectors())._add_(anInspector);
+return self}, function($ctx1) {$ctx1.fill(self,"register:",{anInspector:anInspector},smalltalk.HLInspector.klass)})},
+messageSends: ["add:", "inspectors"]}),
+smalltalk.HLInspector.klass);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "tabLabel",
@@ -408,6 +487,34 @@ return $1;
 messageSends: []}),
 smalltalk.HLInspector.klass);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "unregister:",
+fn: function (anInspector){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._inspectors())._remove_(anInspector);
+return self}, function($ctx1) {$ctx1.fill(self,"unregister:",{anInspector:anInspector},smalltalk.HLInspector.klass)})},
+messageSends: ["remove:", "inspectors"]}),
+smalltalk.HLInspector.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "watchChanges",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st((function(){
+return smalltalk.withContext(function($ctx2) {
+return _st(_st(self)._inspectors())._do_((function(each){
+return smalltalk.withContext(function($ctx3) {
+return _st(each)._refresh();
+}, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithInterval_((500));
+return self}, function($ctx1) {$ctx1.fill(self,"watchChanges",{},smalltalk.HLInspector.klass)})},
+messageSends: ["valueWithInterval:", "do:", "refresh", "inspectors"]}),
+smalltalk.HLInspector.klass);
+
 
 smalltalk.addClass('HLInspectorDisplayWidget', smalltalk.HLNavigationListWidget, ['model'], 'Helios-Inspector');
 smalltalk.addMethod(

+ 147 - 0
js/Helios-Inspector.js

@@ -57,6 +57,23 @@ referencedClasses: ["HLInspectorDisplayWidget"]
 }),
 smalltalk.HLInspector);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "initialize",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+smalltalk.HLWidget.fn.prototype._initialize.apply(_st(self), []);
+_st(self)._register();
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLInspector)})},
+args: [],
+source: "initialize\x0a\x09super initialize.\x0a\x09self register",
+messageSends: ["initialize", "register"],
+referencedClasses: []
+}),
+smalltalk.HLInspector);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "inspect:",
@@ -406,6 +423,22 @@ referencedClasses: []
 }),
 smalltalk.HLInspector);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "register",
+category: 'registration',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._class())._register_(self);
+return self}, function($ctx1) {$ctx1.fill(self,"register",{},smalltalk.HLInspector)})},
+args: [],
+source: "register\x0a\x09self class register: self",
+messageSends: ["register:", "class"],
+referencedClasses: []
+}),
+smalltalk.HLInspector);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "renderContentOn:",
@@ -474,6 +507,23 @@ referencedClasses: []
 }),
 smalltalk.HLInspector);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "unregister",
+category: 'registration',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+smalltalk.HLWidget.fn.prototype._unregister.apply(_st(self), []);
+_st(_st(self)._class())._unregister_(self);
+return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLInspector)})},
+args: [],
+source: "unregister\x0a\x09super unregister.\x0a\x09self class unregister: self",
+messageSends: ["unregister", "unregister:", "class"],
+referencedClasses: []
+}),
+smalltalk.HLInspector);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "variablesWidget",
@@ -503,6 +553,7 @@ referencedClasses: ["HLInspectorVariablesWidget"]
 smalltalk.HLInspector);
 
 
+smalltalk.HLInspector.klass.iVarNames = ['inspectors'];
 smalltalk.addMethod(
 smalltalk.method({
 selector: "canBeOpenAsTab",
@@ -519,6 +570,64 @@ referencedClasses: []
 }),
 smalltalk.HLInspector.klass);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "initialize",
+category: 'initialization',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+smalltalk.HLWidget.klass.fn.prototype._initialize.apply(_st(self), []);
+_st(self)._watchChanges();
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLInspector.klass)})},
+args: [],
+source: "initialize\x0a\x09super initialize.\x0a\x09self watchChanges",
+messageSends: ["initialize", "watchChanges"],
+referencedClasses: []
+}),
+smalltalk.HLInspector.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "inspectors",
+category: 'accessing',
+fn: function (){
+var self=this;
+function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@inspectors"];
+if(($receiver = $2) == nil || $receiver == undefined){
+self["@inspectors"]=_st($OrderedCollection())._new();
+$1=self["@inspectors"];
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"inspectors",{},smalltalk.HLInspector.klass)})},
+args: [],
+source: "inspectors\x0a\x09^ inspectors ifNil: [ inspectors := OrderedCollection new ]",
+messageSends: ["ifNil:", "new"],
+referencedClasses: ["OrderedCollection"]
+}),
+smalltalk.HLInspector.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "register:",
+category: 'registration',
+fn: function (anInspector){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._inspectors())._add_(anInspector);
+return self}, function($ctx1) {$ctx1.fill(self,"register:",{anInspector:anInspector},smalltalk.HLInspector.klass)})},
+args: ["anInspector"],
+source: "register: anInspector\x0a\x09self inspectors add: anInspector",
+messageSends: ["add:", "inspectors"],
+referencedClasses: []
+}),
+smalltalk.HLInspector.klass);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "tabLabel",
@@ -553,6 +662,44 @@ referencedClasses: []
 }),
 smalltalk.HLInspector.klass);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "unregister:",
+category: 'registration',
+fn: function (anInspector){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._inspectors())._remove_(anInspector);
+return self}, function($ctx1) {$ctx1.fill(self,"unregister:",{anInspector:anInspector},smalltalk.HLInspector.klass)})},
+args: ["anInspector"],
+source: "unregister: anInspector\x0a\x09self inspectors remove: anInspector",
+messageSends: ["remove:", "inspectors"],
+referencedClasses: []
+}),
+smalltalk.HLInspector.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "watchChanges",
+category: 'initialization',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st((function(){
+return smalltalk.withContext(function($ctx2) {
+return _st(_st(self)._inspectors())._do_((function(each){
+return smalltalk.withContext(function($ctx3) {
+return _st(each)._refresh();
+}, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithInterval_((500));
+return self}, function($ctx1) {$ctx1.fill(self,"watchChanges",{},smalltalk.HLInspector.klass)})},
+args: [],
+source: "watchChanges\x0a\x09[ self inspectors do: [ :each | each refresh ] ]\x0a\x09\x09valueWithInterval: 500",
+messageSends: ["valueWithInterval:", "do:", "refresh", "inspectors"],
+referencedClasses: []
+}),
+smalltalk.HLInspector.klass);
+
 
 smalltalk.addClass('HLInspectorDisplayWidget', smalltalk.HLNavigationListWidget, ['model'], 'Helios-Inspector');
 smalltalk.addMethod(

+ 46 - 54
st/Helios-Browser.st

@@ -123,7 +123,7 @@ canBeOpenAsTab
 ! !
 
 HLWidget subclass: #HLBrowserBottomWidget
-	instanceVariableNames: 'model codeWidget documentationWidget selectedWidget'
+	instanceVariableNames: 'model codeWidget documentationWidget'
 	package: 'Helios-Browser'!
 
 !HLBrowserBottomWidget methodsFor: 'accessing'!
@@ -155,16 +155,12 @@ previous
 
 previous: aWidget
 	"For navigation"
-!
-
-selectedWidget
-	^ selectedWidget ifNil: [ selectedWidget := self codeWidget ]
 ! !
 
 !HLBrowserBottomWidget methodsFor: 'actions'!
 
 focus
-	self selectedWidget focus
+	self codeWidget focus
 !
 
 observeModel
@@ -175,27 +171,30 @@ observeModel
 		on: HLShowCommentToggled
 		send: #onShowCommentToggled
 		to: self
-!
-
-selectWidget: aWidget
-	selectedWidget := aWidget.
-	self refresh
 ! !
 
 !HLBrowserBottomWidget methodsFor: 'reactions'!
 
 onShowCommentToggled
-	self selectWidget: self documentationWidget
+	self refresh
 !
 
 onShowInstanceToggled
-	self selectWidget: self codeWidget
+	self refresh
 ! !
 
 !HLBrowserBottomWidget methodsFor: 'rendering'!
 
 renderContentOn: html
-	html with: self selectedWidget
+	self model showComment 
+		ifTrue: [ self renderPanesOn: html ]
+		ifFalse: [ html with: self codeWidget ]
+!
+
+renderPanesOn: html
+	html with: (HLVerticalSplitter
+		with: self codeWidget
+		with: self documentationWidget)
 ! !
 
 !HLBrowserBottomWidget methodsFor: 'testing'!
@@ -215,9 +214,8 @@ showComment
 !
 
 showComment: aBoolean
-	self withChangesDo: [
-		showComment := aBoolean.
-		self announcer announce: HLShowCommentToggled new ]
+	showComment := aBoolean.
+	self announcer announce: HLShowCommentToggled new
 !
 
 showInstance
@@ -228,7 +226,6 @@ showInstance: aBoolean
 
 	self withChangesDo: [
 		showInstance := aBoolean.
-		showComment := false.
 
     	self selectedClass ifNotNil: [
     		self selectedClass: (aBoolean
@@ -385,20 +382,6 @@ iconForItem: aClass
 
 label
 	^ 'Classes'
-!
-
-showClass
-	^ self model showInstance not and: [
-		self model showComment not ]
-!
-
-showComment
-	^ self model showComment
-!
-
-showInstance
-	^ self model showInstance and: [
-		self model showComment not ]
 ! !
 
 !HLClassesListWidget methodsFor: 'actions'!
@@ -467,6 +450,10 @@ showComment: aBoolean
 
 showInstance: aBoolean
 	self model showInstance: aBoolean
+!
+
+toggleShowComment
+	self model showComment: self showComment not
 ! !
 
 !HLClassesListWidget methodsFor: 'private'!
@@ -585,6 +572,8 @@ onShowInstanceToggled
 !HLClassesListWidget methodsFor: 'rendering'!
 
 renderButtonsOn: html
+	| checkbox |
+	
 	html div 
         class: 'btn-group';
 		with: [ 
@@ -601,14 +590,17 @@ renderButtonsOn: html
                     self showClass ifTrue: [ 
                     	str nextPutAll: ' active' ] ]);
   				with: 'Class';
-				onClick: [ self showInstance: false ].
-			html button
-  				class: (String streamContents: [ :str |
-                	str nextPutAll: 'btn'.
-                    self showComment ifTrue: [ 
-                    	str nextPutAll: ' active' ] ]);
-  				with: 'Doc';
-				onClick: [ self showComment: true ] ]
+				onClick: [ self showInstance: false ] ].
+		html label 
+			class: 'checkbox';
+			with: [
+				checkbox := html input
+					type: 'checkbox';
+					onClick: [ self toggleShowComment ].
+				html with: 'Doc' ].
+				
+		self showComment ifTrue: [
+			checkbox at: 'checked' put: 'checked' ]
 !
 
 renderItem: aClass level: anInteger on: html
@@ -654,6 +646,20 @@ renderListOn: html
     	do: [ :each | self renderItem: each on: html ]
 ! !
 
+!HLClassesListWidget methodsFor: 'testing'!
+
+showClass
+	^ self model showInstance not
+!
+
+showComment
+	^ self model showComment
+!
+
+showInstance
+	^ self model showInstance
+! !
+
 HLFocusableWidget subclass: #HLDocumentationWidget
 	instanceVariableNames: 'model'
 	package: 'Helios-Browser'!
@@ -1138,10 +1144,6 @@ observeModel
 		send: #onClassSelected:
 		to: self;
 		
-		on: HLShowCommentToggled 
-		send: #onShowCommentToggled
-		to: self;
-		
     	on: HLProtocolSelected
 		send: #onProtocolSelected:
 		to: self;
@@ -1169,9 +1171,6 @@ selectItem: aString
 !HLProtocolsListWidget methodsFor: 'private'!
 
 setItemsForClass: aClass
-	self model showComment ifTrue: [
-		^ self items: #() ].
-		
 	self items: (aClass
     	ifNil: [ Array with: self allProtocol ]
       	ifNotNil: [ 
@@ -1238,13 +1237,6 @@ onProtocolSelected: anAnnouncement
 
 onProtocolsFocusRequested
 	self focus
-!
-
-onShowCommentToggled
-	self 
-		selectItem: nil;
-		setItemsForSelectedClass;
-    	refresh
 ! !
 
 !HLProtocolsListWidget methodsFor: 'rendering'!

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

@@ -150,7 +150,7 @@ HLToggleCommand subclass: #HLToggleClassCommentCommand
 !HLToggleClassCommentCommand methodsFor: 'executing'!
 
 execute
-	self model showComment: true
+	self model showComment: self model showComment not
 ! !
 
 !HLToggleClassCommentCommand class methodsFor: 'accessing'!

+ 44 - 0
st/Helios-Inspector.st

@@ -20,6 +20,11 @@ displayWidget
         	yourself ]
 !
 
+initialize
+	super initialize.
+	self register
+!
+
 inspectee
 	^ self model inspectee
 !
@@ -140,6 +145,17 @@ onRefresh
 	self refresh
 ! !
 
+!HLInspector methodsFor: 'registration'!
+
+register
+	self class register: self
+!
+
+unregister
+	super unregister.
+	self class unregister: self
+! !
+
 !HLInspector methodsFor: 'rendering'!
 
 renderContentOn: html
@@ -152,8 +168,14 @@ renderContentOn: html
 	self variablesWidget focus
 ! !
 
+HLInspector class instanceVariableNames: 'inspectors'!
+
 !HLInspector class methodsFor: 'accessing'!
 
+inspectors
+	^ inspectors ifNil: [ inspectors := OrderedCollection new ]
+!
+
 tabLabel
 	^ 'Inspector'
 !
@@ -162,6 +184,28 @@ tabPriority
 	^ 10
 ! !
 
+!HLInspector class methodsFor: 'initialization'!
+
+initialize
+	super initialize.
+	self watchChanges
+!
+
+watchChanges
+	[ self inspectors do: [ :each | each refresh ] ]
+		valueWithInterval: 500
+! !
+
+!HLInspector class methodsFor: 'registration'!
+
+register: anInspector
+	self inspectors add: anInspector
+!
+
+unregister: anInspector
+	self inspectors remove: anInspector
+! !
+
 !HLInspector class methodsFor: 'testing'!
 
 canBeOpenAsTab