Browse Source

- Helios: Class comment editing now working
- adds Environment >> setClassCommentOf:to:

Nicolas Petton 11 years ago
parent
commit
2cb71cb140

+ 29 - 5
css/helios.css

@@ -542,7 +542,7 @@ i {
     bottom: 0;
 }
 
-.confirmation {
+.confirmation, .dialog {
     z-index: 2001;
     background: rgba(243,243,243,0.9);
     background-image: -webkit-linear-gradient(top, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0) 5px, transparent 6px);
@@ -562,17 +562,39 @@ i {
     -o-transition: top .5s;
 }
 
-.confirmation span {
+.confirmation.large,
+.dialog.large {
+    width: 400px;
+    margin-left: -220px;
+}
+
+.confirmation textarea,
+.dialog textarea {
+    display: block;
+    width: 235px;
+}
+
+.confirmation.large textarea,
+.dialog.large textarea {
+    width: 385px;
+    height: 200px;
+}
+
+
+.confirmation span,
+.dialog span {
     font-size: 13px;
     font-weight: bold;
 }
 
-.confirmation .buttons {
+.confirmation .buttons,
+.dialog .buttons {
     text-align: right;
     margin-top: 20px;
 }
 
-.confirmation.active {
+.confirmation.active,
+.dialog.active {
     top: 0;
 }
 
@@ -634,9 +656,11 @@ i {
     padding: 10px;
     font-size: 22px;
     color: white;
-    border-top: 1px solid #eee;
 }
 
+.doc .button {
+    float: right;
+}
 .doc .markdown,
 .doc .inheritance {
     padding: 10px;

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

@@ -87,6 +87,9 @@ smalltalk.addClass('HLPrintItRequested', smalltalk.HLCodeHandled, [], 'Helios-An
 smalltalk.addClass('HLDiveRequested', smalltalk.HLAnnouncement, [], 'Helios-Announcements');
 
 
+smalltalk.addClass('HLEditComment', smalltalk.HLAnnouncement, [], 'Helios-Announcements');
+
+
 smalltalk.addClass('HLErrorRaised', smalltalk.HLAnnouncement, ['error'], 'Helios-Announcements');
 smalltalk.addMethod(
 smalltalk.method({

+ 3 - 0
js/Helios-Announcements.js

@@ -112,6 +112,9 @@ smalltalk.addClass('HLPrintItRequested', smalltalk.HLCodeHandled, [], 'Helios-An
 smalltalk.addClass('HLDiveRequested', smalltalk.HLAnnouncement, [], 'Helios-Announcements');
 
 
+smalltalk.addClass('HLEditComment', smalltalk.HLAnnouncement, [], 'Helios-Announcements');
+
+
 smalltalk.addClass('HLErrorRaised', smalltalk.HLAnnouncement, ['error'], 'Helios-Announcements');
 smalltalk.addMethod(
 smalltalk.method({

+ 140 - 17
js/Helios-Browser.deploy.js

@@ -459,6 +459,18 @@ smalltalk.HLBrowserBottomWidget);
 
 
 smalltalk.addClass('HLBrowserModel', smalltalk.HLToolModel, ['showInstance', 'showComment'], 'Helios-Browser');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "editComment",
+fn: function (){
+var self=this;
+function $HLEditComment(){return smalltalk.HLEditComment||(typeof HLEditComment=="undefined"?nil:HLEditComment)}
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._announcer())._announce_(_st($HLEditComment())._new());
+return self}, function($ctx1) {$ctx1.fill(self,"editComment",{},smalltalk.HLBrowserModel)})},
+messageSends: ["announce:", "new", "announcer"]}),
+smalltalk.HLBrowserModel);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "focusOnClasses",
@@ -530,6 +542,17 @@ return true;
 messageSends: []}),
 smalltalk.HLBrowserModel);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "setClassComment:",
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._environment())._setClassCommentOf_to_(_st(_st(self)._selectedClass())._theNonMetaClass(),aString);
+return self}, function($ctx1) {$ctx1.fill(self,"setClassComment:",{aString:aString},smalltalk.HLBrowserModel)})},
+messageSends: ["setClassCommentOf:to:", "theNonMetaClass", "selectedClass", "environment"]}),
+smalltalk.HLBrowserModel);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "showComment",
@@ -959,6 +982,7 @@ function $ClassRemoved(){return smalltalk.ClassRemoved||(typeof ClassRemoved=="u
 function $ClassMoved(){return smalltalk.ClassMoved||(typeof ClassMoved=="undefined"?nil:ClassMoved)}
 function $ClassRenamed(){return smalltalk.ClassRenamed||(typeof ClassRenamed=="undefined"?nil:ClassRenamed)}
 function $ClassMigrated(){return smalltalk.ClassMigrated||(typeof ClassMigrated=="undefined"?nil:ClassMigrated)}
+function $ClassCommentChanged(){return smalltalk.ClassCommentChanged||(typeof ClassCommentChanged=="undefined"?nil:ClassCommentChanged)}
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2;
 $1=_st(_st(self)._model())._systemAnnouncer();
@@ -966,7 +990,8 @@ _st($1)._on_send_to_($ClassAdded(),"onClassAdded:",self);
 _st($1)._on_send_to_($ClassRemoved(),"onClassRemoved:",self);
 _st($1)._on_send_to_($ClassMoved(),"onClassMoved:",self);
 _st($1)._on_send_to_($ClassRenamed(),"onClassRenamed:",self);
-$2=_st($1)._on_send_to_($ClassMigrated(),"onClassMigrated:",self);
+_st($1)._on_send_to_($ClassMigrated(),"onClassMigrated:",self);
+$2=_st($1)._on_send_to_($ClassCommentChanged(),"onClassCommentChanged:",self);
 return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLClassesListWidget)})},
 messageSends: ["on:send:to:", "systemAnnouncer", "model"]}),
 smalltalk.HLClassesListWidget);
@@ -994,6 +1019,25 @@ return self}, function($ctx1) {$ctx1.fill(self,"onClassAdded:",{anAnnouncement:a
 messageSends: ["theClass", "ifFalse:", "or:", "includes:", "items", "=", "selectedPackage", "model", "package", "setItemsForSelectedPackage", "refresh"]}),
 smalltalk.HLClassesListWidget);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "onClassCommentChanged:",
+fn: function (anAnnouncement){
+var self=this;
+var class_;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+class_=_st(anAnnouncement)._theClass();
+$1=_st(_st(class_)._package()).__eq(_st(_st(self)._model())._selectedPackage());
+if(! smalltalk.assert($1)){
+$2=self;
+return $2;
+};
+_st(self)._refresh();
+return self}, function($ctx1) {$ctx1.fill(self,"onClassCommentChanged:",{anAnnouncement:anAnnouncement,class_:class_},smalltalk.HLClassesListWidget)})},
+messageSends: ["theClass", "ifFalse:", "=", "selectedPackage", "model", "package", "refresh"]}),
+smalltalk.HLClassesListWidget);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "onClassMigrated:",
@@ -1057,21 +1101,17 @@ fn: function (anAnnouncement){
 var self=this;
 var class_;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 class_=_st(anAnnouncement)._theClass();
 $1=_st(_st(class_)._package()).__eq(_st(_st(self)._model())._selectedPackage());
 if(! smalltalk.assert($1)){
 $2=self;
 return $2;
 };
-$3=_st(class_).__eq(_st(_st(self)._model())._selectedClass());
-if(smalltalk.assert($3)){
-_st(self)._selectItem_(nil);
-};
 _st(self)._setItemsForSelectedPackage();
 _st(self)._refresh();
 return self}, function($ctx1) {$ctx1.fill(self,"onClassRemoved:",{anAnnouncement:anAnnouncement,class_:class_},smalltalk.HLClassesListWidget)})},
-messageSends: ["theClass", "ifFalse:", "=", "selectedPackage", "model", "package", "ifTrue:", "selectItem:", "selectedClass", "setItemsForSelectedPackage", "refresh"]}),
+messageSends: ["theClass", "ifFalse:", "=", "selectedPackage", "model", "package", "setItemsForSelectedPackage", "refresh"]}),
 smalltalk.HLClassesListWidget);
 
 smalltalk.addMethod(
@@ -1493,6 +1533,17 @@ return $1;
 messageSends: ["ifNil:ifNotNil:", "ifEmpty:", "defaultDocumentation", "comment", "selectedItem"]}),
 smalltalk.HLDocumentationWidget);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "editDocumentation",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._model())._editComment();
+return self}, function($ctx1) {$ctx1.fill(self,"editDocumentation",{},smalltalk.HLDocumentationWidget)})},
+messageSends: ["editComment", "model"]}),
+smalltalk.HLDocumentationWidget);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "head",
@@ -1532,10 +1583,13 @@ selector: "model:",
 fn: function (aModel){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
 self["@model"]=aModel;
-_st(self)._observeModel();
+$1=self;
+_st($1)._observeSystem();
+$2=_st($1)._observeModel();
 return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLDocumentationWidget)})},
-messageSends: ["observeModel"]}),
+messageSends: ["observeSystem", "observeModel"]}),
 smalltalk.HLDocumentationWidget);
 
 smalltalk.addMethod(
@@ -1544,12 +1598,43 @@ selector: "observeModel",
 fn: function (){
 var self=this;
 function $HLClassSelected(){return smalltalk.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
+function $HLEditComment(){return smalltalk.HLEditComment||(typeof HLEditComment=="undefined"?nil:HLEditComment)}
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(_st(self)._model())._announcer())._on_send_to_($HLClassSelected(),"onClassSelected:",self);
+var $1,$2;
+$1=_st(_st(self)._model())._announcer();
+_st($1)._on_send_to_($HLClassSelected(),"onClassSelected:",self);
+$2=_st($1)._on_send_to_($HLEditComment(),"onEditDocumentation",self);
 return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLDocumentationWidget)})},
 messageSends: ["on:send:to:", "announcer", "model"]}),
 smalltalk.HLDocumentationWidget);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "observeSystem",
+fn: function (){
+var self=this;
+function $ClassCommentChanged(){return smalltalk.ClassCommentChanged||(typeof ClassCommentChanged=="undefined"?nil:ClassCommentChanged)}
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(_st(self)._model())._systemAnnouncer())._on_send_to_($ClassCommentChanged(),"onClassCommentChanged:",self);
+return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLDocumentationWidget)})},
+messageSends: ["on:send:to:", "systemAnnouncer", "model"]}),
+smalltalk.HLDocumentationWidget);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "onClassCommentChanged:",
+fn: function (anAnnouncement){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(anAnnouncement)._theClass()).__eq(_st(_st(_st(self)._model())._selectedClass())._theNonMetaClass());
+if(smalltalk.assert($1)){
+_st(self)._refresh();
+};
+return self}, function($ctx1) {$ctx1.fill(self,"onClassCommentChanged:",{anAnnouncement:anAnnouncement},smalltalk.HLDocumentationWidget)})},
+messageSends: ["ifTrue:", "refresh", "=", "theNonMetaClass", "selectedClass", "model", "theClass"]}),
+smalltalk.HLDocumentationWidget);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "onClassSelected:",
@@ -1561,6 +1646,20 @@ return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{anAnnouncemen
 messageSends: ["refresh"]}),
 smalltalk.HLDocumentationWidget);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "onEditDocumentation",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(self)._request_value_do_(_st(_st(_st(_st(_st(self)._model())._selectedClass())._theNonMetaClass())._name()).__comma(" comment"),_st(_st(_st(_st(self)._model())._selectedClass())._theNonMetaClass())._comment(),(function(comment){
+return smalltalk.withContext(function($ctx2) {
+return _st(self)._setClassComment_(comment);
+}, function($ctx2) {$ctx2.fillBlock({comment:comment},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"onEditDocumentation",{},smalltalk.HLDocumentationWidget)})},
+messageSends: ["request:value:do:", ",", "name", "theNonMetaClass", "selectedClass", "model", "comment", "setClassComment:"]}),
+smalltalk.HLDocumentationWidget);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "renderContentOn:",
@@ -1588,20 +1687,33 @@ fn: function (html){
 var self=this;
 function $Showdown(){return smalltalk.Showdown||(typeof Showdown=="undefined"?nil:Showdown)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2,$4,$5,$3,$6,$7;
 $1=_st(self)._selectedItem();
 if(($receiver = $1) == nil || $receiver == undefined){
 $1;
 } else {
 _st(self)._renderInheritanceOn_(html);
-_st(_st(html)._h1())._with_("Overview");
-$2=_st(html)._div();
-_st($2)._class_("markdown");
-$3=_st($2)._asJQuery();
-_st($3)._html_(_st(_st(_st($Showdown())._at_("converter"))._new())._makeHtml_(_st(self)._documentation()));
+$2=_st(html)._h1();
+_st($2)._with_("Overview");
+$3=_st($2)._with_((function(){
+return smalltalk.withContext(function($ctx2) {
+$4=_st(html)._button();
+_st($4)._class_("button default");
+_st($4)._with_("Edit");
+$5=_st($4)._onClick_((function(){
+return smalltalk.withContext(function($ctx3) {
+return _st(self)._editDocumentation();
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
+return $5;
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+$3;
+$6=_st(html)._div();
+_st($6)._class_("markdown");
+$7=_st($6)._asJQuery();
+_st($7)._html_(_st(_st(_st($Showdown())._at_("converter"))._new())._makeHtml_(_st(self)._documentation()));
 };
 return self}, function($ctx1) {$ctx1.fill(self,"renderDocOn:",{html:html},smalltalk.HLDocumentationWidget)})},
-messageSends: ["ifNotNil:", "renderInheritanceOn:", "with:", "h1", "html:", "makeHtml:", "documentation", "new", "at:", "class:", "div", "asJQuery", "selectedItem"]}),
+messageSends: ["ifNotNil:", "renderInheritanceOn:", "with:", "h1", "class:", "button", "onClick:", "editDocumentation", "html:", "makeHtml:", "documentation", "new", "at:", "div", "asJQuery", "selectedItem"]}),
 smalltalk.HLDocumentationWidget);
 
 smalltalk.addMethod(
@@ -1678,6 +1790,17 @@ return $1;
 messageSends: ["ifNotNil:", "theNonMetaClass", "selectedClass", "model"]}),
 smalltalk.HLDocumentationWidget);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "setClassComment:",
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._model())._setClassComment_(aString);
+return self}, function($ctx1) {$ctx1.fill(self,"setClassComment:",{aString:aString},smalltalk.HLDocumentationWidget)})},
+messageSends: ["setClassComment:", "model"]}),
+smalltalk.HLDocumentationWidget);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "unregister",

+ 187 - 24
js/Helios-Browser.js

@@ -609,6 +609,23 @@ smalltalk.HLBrowserBottomWidget);
 
 
 smalltalk.addClass('HLBrowserModel', smalltalk.HLToolModel, ['showInstance', 'showComment'], 'Helios-Browser');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "editComment",
+category: 'commands actions',
+fn: function (){
+var self=this;
+function $HLEditComment(){return smalltalk.HLEditComment||(typeof HLEditComment=="undefined"?nil:HLEditComment)}
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._announcer())._announce_(_st($HLEditComment())._new());
+return self}, function($ctx1) {$ctx1.fill(self,"editComment",{},smalltalk.HLBrowserModel)})},
+args: [],
+source: "editComment\x0a\x09self announcer announce: HLEditComment new",
+messageSends: ["announce:", "new", "announcer"],
+referencedClasses: ["HLEditComment"]
+}),
+smalltalk.HLBrowserModel);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "focusOnClasses",
@@ -710,6 +727,22 @@ referencedClasses: []
 }),
 smalltalk.HLBrowserModel);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "setClassComment:",
+category: 'actions',
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._environment())._setClassCommentOf_to_(_st(_st(self)._selectedClass())._theNonMetaClass(),aString);
+return self}, function($ctx1) {$ctx1.fill(self,"setClassComment:",{aString:aString},smalltalk.HLBrowserModel)})},
+args: ["aString"],
+source: "setClassComment: aString\x0a\x09self environment\x0a\x09\x09setClassCommentOf: self selectedClass theNonMetaClass\x0a\x09\x09to: aString",
+messageSends: ["setClassCommentOf:to:", "theNonMetaClass", "selectedClass", "environment"],
+referencedClasses: []
+}),
+smalltalk.HLBrowserModel);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "showComment",
@@ -1265,6 +1298,7 @@ function $ClassRemoved(){return smalltalk.ClassRemoved||(typeof ClassRemoved=="u
 function $ClassMoved(){return smalltalk.ClassMoved||(typeof ClassMoved=="undefined"?nil:ClassMoved)}
 function $ClassRenamed(){return smalltalk.ClassRenamed||(typeof ClassRenamed=="undefined"?nil:ClassRenamed)}
 function $ClassMigrated(){return smalltalk.ClassMigrated||(typeof ClassMigrated=="undefined"?nil:ClassMigrated)}
+function $ClassCommentChanged(){return smalltalk.ClassCommentChanged||(typeof ClassCommentChanged=="undefined"?nil:ClassCommentChanged)}
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2;
 $1=_st(_st(self)._model())._systemAnnouncer();
@@ -1272,12 +1306,13 @@ _st($1)._on_send_to_($ClassAdded(),"onClassAdded:",self);
 _st($1)._on_send_to_($ClassRemoved(),"onClassRemoved:",self);
 _st($1)._on_send_to_($ClassMoved(),"onClassMoved:",self);
 _st($1)._on_send_to_($ClassRenamed(),"onClassRenamed:",self);
-$2=_st($1)._on_send_to_($ClassMigrated(),"onClassMigrated:",self);
+_st($1)._on_send_to_($ClassMigrated(),"onClassMigrated:",self);
+$2=_st($1)._on_send_to_($ClassCommentChanged(),"onClassCommentChanged:",self);
 return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLClassesListWidget)})},
 args: [],
-source: "observeSystem\x0a\x09self model systemAnnouncer\x0a    \x09on: ClassAdded\x0a\x09\x09send: #onClassAdded:\x0a\x09\x09to: self;\x0a\x09\x09\x0a        on: ClassRemoved\x0a        send: #onClassRemoved:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: ClassMoved\x0a\x09\x09send: #onClassMoved:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: ClassRenamed\x0a\x09\x09send: #onClassRenamed:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: ClassMigrated\x0a\x09\x09send: #onClassMigrated:\x0a\x09\x09to: self",
+source: "observeSystem\x0a\x09self model systemAnnouncer\x0a    \x09on: ClassAdded\x0a\x09\x09send: #onClassAdded:\x0a\x09\x09to: self;\x0a\x09\x09\x0a        on: ClassRemoved\x0a        send: #onClassRemoved:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: ClassMoved\x0a\x09\x09send: #onClassMoved:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: ClassRenamed\x0a\x09\x09send: #onClassRenamed:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: ClassMigrated\x0a\x09\x09send: #onClassMigrated:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: ClassCommentChanged\x0a        send: #onClassCommentChanged:\x0a\x09\x09to: self",
 messageSends: ["on:send:to:", "systemAnnouncer", "model"],
-referencedClasses: ["ClassAdded", "ClassRemoved", "ClassMoved", "ClassRenamed", "ClassMigrated"]
+referencedClasses: ["ClassAdded", "ClassRemoved", "ClassMoved", "ClassRenamed", "ClassMigrated", "ClassCommentChanged"]
 }),
 smalltalk.HLClassesListWidget);
 
@@ -1309,6 +1344,30 @@ referencedClasses: []
 }),
 smalltalk.HLClassesListWidget);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "onClassCommentChanged:",
+category: 'reactions',
+fn: function (anAnnouncement){
+var self=this;
+var class_;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+class_=_st(anAnnouncement)._theClass();
+$1=_st(_st(class_)._package()).__eq(_st(_st(self)._model())._selectedPackage());
+if(! smalltalk.assert($1)){
+$2=self;
+return $2;
+};
+_st(self)._refresh();
+return self}, function($ctx1) {$ctx1.fill(self,"onClassCommentChanged:",{anAnnouncement:anAnnouncement,class_:class_},smalltalk.HLClassesListWidget)})},
+args: ["anAnnouncement"],
+source: "onClassCommentChanged: anAnnouncement\x0a\x09| class |\x0a\x09class := anAnnouncement theClass.\x0a\x0a\x09class package = self model selectedPackage ifFalse: [ ^ self ].\x0a    \x0a    self refresh",
+messageSends: ["theClass", "ifFalse:", "=", "selectedPackage", "model", "package", "refresh"],
+referencedClasses: []
+}),
+smalltalk.HLClassesListWidget);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "onClassMigrated:",
@@ -1383,23 +1442,19 @@ fn: function (anAnnouncement){
 var self=this;
 var class_;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 class_=_st(anAnnouncement)._theClass();
 $1=_st(_st(class_)._package()).__eq(_st(_st(self)._model())._selectedPackage());
 if(! smalltalk.assert($1)){
 $2=self;
 return $2;
 };
-$3=_st(class_).__eq(_st(_st(self)._model())._selectedClass());
-if(smalltalk.assert($3)){
-_st(self)._selectItem_(nil);
-};
 _st(self)._setItemsForSelectedPackage();
 _st(self)._refresh();
 return self}, function($ctx1) {$ctx1.fill(self,"onClassRemoved:",{anAnnouncement:anAnnouncement,class_:class_},smalltalk.HLClassesListWidget)})},
 args: ["anAnnouncement"],
-source: "onClassRemoved: anAnnouncement\x0a\x09| class |\x0a\x09class := anAnnouncement theClass.\x0a\x0a\x09class package = self model selectedPackage ifFalse: [ ^ self ].\x0a    class = self model selectedClass ifTrue: [ self selectItem: nil ].\x0a    \x0a    self setItemsForSelectedPackage.\x0a    self refresh",
-messageSends: ["theClass", "ifFalse:", "=", "selectedPackage", "model", "package", "ifTrue:", "selectItem:", "selectedClass", "setItemsForSelectedPackage", "refresh"],
+source: "onClassRemoved: anAnnouncement\x0a\x09| class |\x0a\x09class := anAnnouncement theClass.\x0a\x0a\x09class package = self model selectedPackage ifFalse: [ ^ self ].\x0a    \x0a    self setItemsForSelectedPackage.\x0a    self refresh",
+messageSends: ["theClass", "ifFalse:", "=", "selectedPackage", "model", "package", "setItemsForSelectedPackage", "refresh"],
 referencedClasses: []
 }),
 smalltalk.HLClassesListWidget);
@@ -1943,6 +1998,22 @@ referencedClasses: []
 }),
 smalltalk.HLDocumentationWidget);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "editDocumentation",
+category: 'actions',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._model())._editComment();
+return self}, function($ctx1) {$ctx1.fill(self,"editDocumentation",{},smalltalk.HLDocumentationWidget)})},
+args: [],
+source: "editDocumentation\x0a\x09self model editComment",
+messageSends: ["editComment", "model"],
+referencedClasses: []
+}),
+smalltalk.HLDocumentationWidget);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "head",
@@ -1993,12 +2064,15 @@ category: 'accessing',
 fn: function (aModel){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
 self["@model"]=aModel;
-_st(self)._observeModel();
+$1=self;
+_st($1)._observeSystem();
+$2=_st($1)._observeModel();
 return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLDocumentationWidget)})},
 args: ["aModel"],
-source: "model: aModel\x0a\x09model := aModel.\x0a\x09self observeModel",
-messageSends: ["observeModel"],
+source: "model: aModel\x0a\x09model := aModel.\x0a\x09self \x0a\x09\x09observeSystem;\x0a\x09\x09observeModel",
+messageSends: ["observeSystem", "observeModel"],
 referencedClasses: []
 }),
 smalltalk.HLDocumentationWidget);
@@ -2010,13 +2084,54 @@ category: 'actions',
 fn: function (){
 var self=this;
 function $HLClassSelected(){return smalltalk.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
+function $HLEditComment(){return smalltalk.HLEditComment||(typeof HLEditComment=="undefined"?nil:HLEditComment)}
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(_st(self)._model())._announcer())._on_send_to_($HLClassSelected(),"onClassSelected:",self);
+var $1,$2;
+$1=_st(_st(self)._model())._announcer();
+_st($1)._on_send_to_($HLClassSelected(),"onClassSelected:",self);
+$2=_st($1)._on_send_to_($HLEditComment(),"onEditDocumentation",self);
 return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLDocumentationWidget)})},
 args: [],
-source: "observeModel\x0a\x09self model announcer \x0a\x09\x09on: HLClassSelected\x0a\x09\x09send: #onClassSelected:\x0a\x09\x09to: self",
+source: "observeModel\x0a\x09self model announcer \x0a\x09\x09on: HLClassSelected\x0a\x09\x09send: #onClassSelected:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLEditComment\x0a\x09\x09send: #onEditDocumentation\x0a\x09\x09to: self",
 messageSends: ["on:send:to:", "announcer", "model"],
-referencedClasses: ["HLClassSelected"]
+referencedClasses: ["HLClassSelected", "HLEditComment"]
+}),
+smalltalk.HLDocumentationWidget);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "observeSystem",
+category: 'actions',
+fn: function (){
+var self=this;
+function $ClassCommentChanged(){return smalltalk.ClassCommentChanged||(typeof ClassCommentChanged=="undefined"?nil:ClassCommentChanged)}
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(_st(self)._model())._systemAnnouncer())._on_send_to_($ClassCommentChanged(),"onClassCommentChanged:",self);
+return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLDocumentationWidget)})},
+args: [],
+source: "observeSystem\x0a\x09self model systemAnnouncer \x0a\x09\x09on: ClassCommentChanged\x0a\x09\x09send: #onClassCommentChanged:\x0a\x09\x09to: self",
+messageSends: ["on:send:to:", "systemAnnouncer", "model"],
+referencedClasses: ["ClassCommentChanged"]
+}),
+smalltalk.HLDocumentationWidget);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "onClassCommentChanged:",
+category: 'reactions',
+fn: function (anAnnouncement){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(anAnnouncement)._theClass()).__eq(_st(_st(_st(self)._model())._selectedClass())._theNonMetaClass());
+if(smalltalk.assert($1)){
+_st(self)._refresh();
+};
+return self}, function($ctx1) {$ctx1.fill(self,"onClassCommentChanged:",{anAnnouncement:anAnnouncement},smalltalk.HLDocumentationWidget)})},
+args: ["anAnnouncement"],
+source: "onClassCommentChanged: anAnnouncement\x0a\x09anAnnouncement theClass = self model selectedClass theNonMetaClass\x0a\x09\x09ifTrue: [ self refresh ]",
+messageSends: ["ifTrue:", "refresh", "=", "theNonMetaClass", "selectedClass", "model", "theClass"],
+referencedClasses: []
 }),
 smalltalk.HLDocumentationWidget);
 
@@ -2036,6 +2151,25 @@ referencedClasses: []
 }),
 smalltalk.HLDocumentationWidget);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "onEditDocumentation",
+category: 'reactions',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(self)._request_value_do_(_st(_st(_st(_st(_st(self)._model())._selectedClass())._theNonMetaClass())._name()).__comma(" comment"),_st(_st(_st(_st(self)._model())._selectedClass())._theNonMetaClass())._comment(),(function(comment){
+return smalltalk.withContext(function($ctx2) {
+return _st(self)._setClassComment_(comment);
+}, function($ctx2) {$ctx2.fillBlock({comment:comment},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"onEditDocumentation",{},smalltalk.HLDocumentationWidget)})},
+args: [],
+source: "onEditDocumentation\x0a\x09self \x0a\x09\x09request: self model selectedClass theNonMetaClass name, ' comment'\x0a\x09\x09value: self model selectedClass theNonMetaClass comment\x0a\x09\x09do: [ :comment | self setClassComment: comment ]",
+messageSends: ["request:value:do:", ",", "name", "theNonMetaClass", "selectedClass", "model", "comment", "setClassComment:"],
+referencedClasses: []
+}),
+smalltalk.HLDocumentationWidget);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "renderContentOn:",
@@ -2069,22 +2203,35 @@ fn: function (html){
 var self=this;
 function $Showdown(){return smalltalk.Showdown||(typeof Showdown=="undefined"?nil:Showdown)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2,$4,$5,$3,$6,$7;
 $1=_st(self)._selectedItem();
 if(($receiver = $1) == nil || $receiver == undefined){
 $1;
 } else {
 _st(self)._renderInheritanceOn_(html);
-_st(_st(html)._h1())._with_("Overview");
-$2=_st(html)._div();
-_st($2)._class_("markdown");
-$3=_st($2)._asJQuery();
-_st($3)._html_(_st(_st(_st($Showdown())._at_("converter"))._new())._makeHtml_(_st(self)._documentation()));
+$2=_st(html)._h1();
+_st($2)._with_("Overview");
+$3=_st($2)._with_((function(){
+return smalltalk.withContext(function($ctx2) {
+$4=_st(html)._button();
+_st($4)._class_("button default");
+_st($4)._with_("Edit");
+$5=_st($4)._onClick_((function(){
+return smalltalk.withContext(function($ctx3) {
+return _st(self)._editDocumentation();
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
+return $5;
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+$3;
+$6=_st(html)._div();
+_st($6)._class_("markdown");
+$7=_st($6)._asJQuery();
+_st($7)._html_(_st(_st(_st($Showdown())._at_("converter"))._new())._makeHtml_(_st(self)._documentation()));
 };
 return self}, function($ctx1) {$ctx1.fill(self,"renderDocOn:",{html:html},smalltalk.HLDocumentationWidget)})},
 args: ["html"],
-source: "renderDocOn: html\x0a\x09self selectedItem ifNotNil: [\x0a\x09\x09self renderInheritanceOn: html.\x0a\x09\x09html h1 with: 'Overview'.\x0a\x09\x09(html div \x0a\x09\x09\x09class: 'markdown';\x0a\x09\x09\x09asJQuery) html: ((Showdown at: 'converter') new makeHtml: self documentation) ]",
-messageSends: ["ifNotNil:", "renderInheritanceOn:", "with:", "h1", "html:", "makeHtml:", "documentation", "new", "at:", "class:", "div", "asJQuery", "selectedItem"],
+source: "renderDocOn: html\x0a\x09self selectedItem ifNotNil: [\x0a\x09\x09self renderInheritanceOn: html.\x0a\x09\x09html h1 \x0a\x09\x09\x09with: 'Overview';\x0a\x09\x09\x09with: [ \x0a\x09\x09\x09\x09html button\x0a\x09\x09\x09\x09\x09class: 'button default';\x0a\x09\x09\x09\x09\x09with: 'Edit';\x0a\x09\x09\x09\x09\x09onClick: [ self editDocumentation ] ].\x0a\x09\x09(html div \x0a\x09\x09\x09class: 'markdown';\x0a\x09\x09\x09asJQuery) html: ((Showdown at: 'converter') new makeHtml: self documentation) ]",
+messageSends: ["ifNotNil:", "renderInheritanceOn:", "with:", "h1", "class:", "button", "onClick:", "editDocumentation", "html:", "makeHtml:", "documentation", "new", "at:", "div", "asJQuery", "selectedItem"],
 referencedClasses: ["Showdown"]
 }),
 smalltalk.HLDocumentationWidget);
@@ -2183,6 +2330,22 @@ referencedClasses: []
 }),
 smalltalk.HLDocumentationWidget);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "setClassComment:",
+category: 'reactions',
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._model())._setClassComment_(aString);
+return self}, function($ctx1) {$ctx1.fill(self,"setClassComment:",{aString:aString},smalltalk.HLDocumentationWidget)})},
+args: ["aString"],
+source: "setClassComment: aString\x0a\x09self model setClassComment: aString",
+messageSends: ["setClassComment:", "model"],
+referencedClasses: []
+}),
+smalltalk.HLDocumentationWidget);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "unregister",

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

@@ -233,6 +233,58 @@ messageSends: []}),
 smalltalk.HLGoToSourceCodeCommand.klass);
 
 
+smalltalk.addClass('HLEditCommentCommand', smalltalk.HLBrowserCommand, [], 'Helios-Commands-Browser');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "execute",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._model())._editComment();
+return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLEditCommentCommand)})},
+messageSends: ["editComment", "model"]}),
+smalltalk.HLEditCommentCommand);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "isActive",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(_st(self)._model())._showComment())._and_((function(){
+return smalltalk.withContext(function($ctx2) {
+return _st(_st(_st(self)._model())._selectedClass())._notNil();
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"isActive",{},smalltalk.HLEditCommentCommand)})},
+messageSends: ["and:", "notNil", "selectedClass", "model", "showComment"]}),
+smalltalk.HLEditCommentCommand);
+
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "key",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "d";
+}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLEditCommentCommand.klass)})},
+messageSends: []}),
+smalltalk.HLEditCommentCommand.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "label",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "Edit documentation";
+}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLEditCommentCommand.klass)})},
+messageSends: []}),
+smalltalk.HLEditCommentCommand.klass);
+
+
 smalltalk.addClass('HLToggleCommand', smalltalk.HLBrowserCommand, [], 'Helios-Commands-Browser');
 
 smalltalk.addMethod(

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

@@ -328,6 +328,78 @@ referencedClasses: []
 smalltalk.HLGoToSourceCodeCommand.klass);
 
 
+smalltalk.addClass('HLEditCommentCommand', smalltalk.HLBrowserCommand, [], 'Helios-Commands-Browser');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "execute",
+category: 'executing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._model())._editComment();
+return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLEditCommentCommand)})},
+args: [],
+source: "execute\x0a\x09self model editComment",
+messageSends: ["editComment", "model"],
+referencedClasses: []
+}),
+smalltalk.HLEditCommentCommand);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "isActive",
+category: 'testing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(_st(self)._model())._showComment())._and_((function(){
+return smalltalk.withContext(function($ctx2) {
+return _st(_st(_st(self)._model())._selectedClass())._notNil();
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"isActive",{},smalltalk.HLEditCommentCommand)})},
+args: [],
+source: "isActive\x0a\x09^ self model showComment and: [ self model selectedClass notNil ]",
+messageSends: ["and:", "notNil", "selectedClass", "model", "showComment"],
+referencedClasses: []
+}),
+smalltalk.HLEditCommentCommand);
+
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "key",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "d";
+}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLEditCommentCommand.klass)})},
+args: [],
+source: "key\x0a\x09^ 'd'",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.HLEditCommentCommand.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "label",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "Edit documentation";
+}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLEditCommentCommand.klass)})},
+args: [],
+source: "label\x0a\x09^ 'Edit documentation'",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.HLEditCommentCommand.klass);
+
+
 smalltalk.addClass('HLToggleCommand', smalltalk.HLBrowserCommand, [], 'Helios-Commands-Browser');
 
 smalltalk.addMethod(

+ 183 - 28
js/Helios-Core.deploy.js

@@ -1246,6 +1246,28 @@ return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk
 messageSends: ["div", "appendToJQuery:", "asJQuery", "renderContentOn:"]}),
 smalltalk.HLWidget);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "request:do:",
+fn: function (aString,aBlock){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._manager())._request_do_(aString,aBlock);
+return self}, function($ctx1) {$ctx1.fill(self,"request:do:",{aString:aString,aBlock:aBlock},smalltalk.HLWidget)})},
+messageSends: ["request:do:", "manager"]}),
+smalltalk.HLWidget);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "request:value:do:",
+fn: function (aString,valueString,aBlock){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._manager())._request_value_do_(aString,valueString,aBlock);
+return self}, function($ctx1) {$ctx1.fill(self,"request:value:do:",{aString:aString,valueString:valueString,aBlock:aBlock},smalltalk.HLWidget)})},
+messageSends: ["request:value:do:", "manager"]}),
+smalltalk.HLWidget);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "unregister",
@@ -1441,17 +1463,28 @@ return self}, function($ctx1) {$ctx1.fill(self,"confirmationString:",{aString:aS
 messageSends: []}),
 smalltalk.HLConfirmation);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "cssClass",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "";
+}, function($ctx1) {$ctx1.fill(self,"cssClass",{},smalltalk.HLConfirmation)})},
+messageSends: []}),
+smalltalk.HLConfirmation);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "remove",
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(window)._jQuery_(".confirmation"))._removeClass_("active");
+_st(_st(window)._jQuery_(".dialog"))._removeClass_("active");
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
 _st(_st(window)._jQuery_("#overlay"))._remove();
-return _st(_st(window)._jQuery_(".confirmation"))._remove();
+return _st(_st(window)._jQuery_(".dialog"))._remove();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithTimeout_((300));
 return self}, function($ctx1) {$ctx1.fill(self,"remove",{},smalltalk.HLConfirmation)})},
 messageSends: ["removeClass:", "jQuery:", "valueWithTimeout:", "remove"]}),
@@ -1459,47 +1492,72 @@ smalltalk.HLConfirmation);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "renderContentOn:",
+selector: "renderButtonsOn:",
 fn: function (html){
 var self=this;
 var confirmButton;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$5,$6,$7,$8,$4,$2;
-_st(_st(html)._div())._id_("overlay");
+var $1,$3,$4,$5,$6,$2;
 $1=_st(html)._div();
-_st($1)._class_("confirmation");
+_st($1)._class_("buttons");
 $2=_st($1)._with_((function(){
 return smalltalk.withContext(function($ctx2) {
-_st(_st(html)._span())._with_(_st(self)._confirmationString());
-$3=_st(html)._div();
-_st($3)._class_("buttons");
-$4=_st($3)._with_((function(){
+$3=_st(html)._button();
+_st($3)._class_("button");
+_st($3)._with_("Cancel");
+$4=_st($3)._onClick_((function(){
 return smalltalk.withContext(function($ctx3) {
+return _st(self)._cancel();
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
+$4;
 $5=_st(html)._button();
-_st($5)._class_("button");
-_st($5)._with_("Cancel");
+_st($5)._class_("button default");
+_st($5)._with_("Confirm");
 $6=_st($5)._onClick_((function(){
-return smalltalk.withContext(function($ctx4) {
-return _st(self)._cancel();
-}, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
-$6;
-$7=_st(html)._button();
-_st($7)._class_("button default");
-_st($7)._with_("Confirm");
-$8=_st($7)._onClick_((function(){
-return smalltalk.withContext(function($ctx4) {
+return smalltalk.withContext(function($ctx3) {
 return _st(self)._confirm();
-}, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
-confirmButton=$8;
-return confirmButton;
 }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
-return $4;
+confirmButton=$6;
+return confirmButton;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
 _st(_st(confirmButton)._asJQuery())._focus();
-_st(_st(window)._jQuery_(".confirmation"))._addClass_("active");
+return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html,confirmButton:confirmButton},smalltalk.HLConfirmation)})},
+messageSends: ["class:", "div", "with:", "button", "onClick:", "cancel", "confirm", "focus", "asJQuery"]}),
+smalltalk.HLConfirmation);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renderContentOn:",
+fn: function (html){
+var self=this;
+var confirmButton;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$3,$4,$2;
+_st(_st(html)._div())._id_("overlay");
+$1=_st(html)._div();
+_st($1)._class_(_st("dialog ").__comma(_st(self)._cssClass()));
+$2=_st($1)._with_((function(){
+return smalltalk.withContext(function($ctx2) {
+$3=self;
+_st($3)._renderMainOn_(html);
+$4=_st($3)._renderButtonsOn_(html);
+return $4;
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+_st(_st(window)._jQuery_(".dialog"))._addClass_("active");
 _st(self)._setupKeyBindings();
 return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html,confirmButton:confirmButton},smalltalk.HLConfirmation)})},
-messageSends: ["id:", "div", "class:", "with:", "confirmationString", "span", "button", "onClick:", "cancel", "confirm", "focus", "asJQuery", "addClass:", "jQuery:", "setupKeyBindings"]}),
+messageSends: ["id:", "div", "class:", ",", "cssClass", "with:", "renderMainOn:", "renderButtonsOn:", "addClass:", "jQuery:", "setupKeyBindings"]}),
+smalltalk.HLConfirmation);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renderMainOn:",
+fn: function (html){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(html)._span())._with_(_st(self)._confirmationString());
+return self}, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},smalltalk.HLConfirmation)})},
+messageSends: ["with:", "confirmationString", "span"]}),
 smalltalk.HLConfirmation);
 
 smalltalk.addMethod(
@@ -1509,7 +1567,7 @@ fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-_st(_st(window)._jQuery_(".confirmation"))._keyup_((function(e){
+_st(_st(window)._jQuery_(".dialog"))._keyup_((function(e){
 return smalltalk.withContext(function($ctx2) {
 $1=_st(_st(e)._keyCode()).__eq((27));
 if(smalltalk.assert($1)){
@@ -1522,6 +1580,74 @@ smalltalk.HLConfirmation);
 
 
 
+smalltalk.addClass('HLRequest', smalltalk.HLConfirmation, ['input', 'value'], 'Helios-Core');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "confirm",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._actionBlock())._value_(_st(_st(self["@input"])._asJQuery())._val());
+_st(self)._remove();
+return self}, function($ctx1) {$ctx1.fill(self,"confirm",{},smalltalk.HLRequest)})},
+messageSends: ["value:", "val", "asJQuery", "actionBlock", "remove"]}),
+smalltalk.HLRequest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "cssClass",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "large";
+}, function($ctx1) {$ctx1.fill(self,"cssClass",{},smalltalk.HLRequest)})},
+messageSends: []}),
+smalltalk.HLRequest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renderMainOn:",
+fn: function (html){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+smalltalk.HLConfirmation.fn.prototype._renderMainOn_.apply(_st(self), [html]);
+self["@input"]=_st(html)._textarea();
+_st(_st(self["@input"])._asJQuery())._val_(_st(self)._value());
+return self}, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},smalltalk.HLRequest)})},
+messageSends: ["renderMainOn:", "textarea", "val:", "value", "asJQuery"]}),
+smalltalk.HLRequest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "value",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@value"];
+if(($receiver = $2) == nil || $receiver == undefined){
+$1="";
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.HLRequest)})},
+messageSends: ["ifNil:"]}),
+smalltalk.HLRequest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "value:",
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self["@value"]=aString;
+return self}, function($ctx1) {$ctx1.fill(self,"value:",{aString:aString},smalltalk.HLRequest)})},
+messageSends: []}),
+smalltalk.HLRequest);
+
+
+
 smalltalk.addClass('HLDebugger', smalltalk.HLWidget, [], 'Helios-Core');
 
 
@@ -2912,6 +3038,35 @@ return self}, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html},small
 messageSends: ["class:", "ul", "with:", "do:", "ifTrue:ifFalse:", "isActive", "li", "onClick:", "removeTab:", "tag:", "displayLabel", "a", "activate", "tabs", "renderAddOn:"]}),
 smalltalk.HLManager);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "request:do:",
+fn: function (aString,aBlock){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(self)._request_value_do_(aString,"",aBlock);
+return self}, function($ctx1) {$ctx1.fill(self,"request:do:",{aString:aString,aBlock:aBlock},smalltalk.HLManager)})},
+messageSends: ["request:value:do:"]}),
+smalltalk.HLManager);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "request:value:do:",
+fn: function (aString,valueString,aBlock){
+var self=this;
+function $HLRequest(){return smalltalk.HLRequest||(typeof HLRequest=="undefined"?nil:HLRequest)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+$1=_st($HLRequest())._new();
+_st($1)._confirmationString_(aString);
+_st($1)._actionBlock_(aBlock);
+_st($1)._value_(valueString);
+$2=_st($1)._yourself();
+_st($2)._appendToJQuery_(_st("body")._asJQuery());
+return self}, function($ctx1) {$ctx1.fill(self,"request:value:do:",{aString:aString,valueString:valueString,aBlock:aBlock},smalltalk.HLManager)})},
+messageSends: ["appendToJQuery:", "asJQuery", "confirmationString:", "new", "actionBlock:", "value:", "yourself"]}),
+smalltalk.HLManager);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "show:",

+ 246 - 31
js/Helios-Core.js

@@ -1636,6 +1636,38 @@ referencedClasses: []
 }),
 smalltalk.HLWidget);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "request:do:",
+category: 'actions',
+fn: function (aString,aBlock){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._manager())._request_do_(aString,aBlock);
+return self}, function($ctx1) {$ctx1.fill(self,"request:do:",{aString:aString,aBlock:aBlock},smalltalk.HLWidget)})},
+args: ["aString", "aBlock"],
+source: "request: aString do: aBlock\x0a\x09self manager request: aString do: aBlock",
+messageSends: ["request:do:", "manager"],
+referencedClasses: []
+}),
+smalltalk.HLWidget);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "request:value:do:",
+category: 'actions',
+fn: function (aString,valueString,aBlock){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._manager())._request_value_do_(aString,valueString,aBlock);
+return self}, function($ctx1) {$ctx1.fill(self,"request:value:do:",{aString:aString,valueString:valueString,aBlock:aBlock},smalltalk.HLWidget)})},
+args: ["aString", "valueString", "aBlock"],
+source: "request: aString value: valueString do: aBlock\x0a\x09self manager \x0a\x09\x09request: aString \x0a\x09\x09value: valueString\x0a\x09\x09do: aBlock",
+messageSends: ["request:value:do:", "manager"],
+referencedClasses: []
+}),
+smalltalk.HLWidget);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "unregister",
@@ -1901,6 +1933,22 @@ referencedClasses: []
 }),
 smalltalk.HLConfirmation);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "cssClass",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "";
+}, function($ctx1) {$ctx1.fill(self,"cssClass",{},smalltalk.HLConfirmation)})},
+args: [],
+source: "cssClass\x0a\x09^ ''",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.HLConfirmation);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "remove",
@@ -1908,15 +1956,15 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(window)._jQuery_(".confirmation"))._removeClass_("active");
+_st(_st(window)._jQuery_(".dialog"))._removeClass_("active");
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
 _st(_st(window)._jQuery_("#overlay"))._remove();
-return _st(_st(window)._jQuery_(".confirmation"))._remove();
+return _st(_st(window)._jQuery_(".dialog"))._remove();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithTimeout_((300));
 return self}, function($ctx1) {$ctx1.fill(self,"remove",{},smalltalk.HLConfirmation)})},
 args: [],
-source: "remove\x0a\x09(window jQuery: '.confirmation') removeClass: 'active'.\x0a\x09[ \x0a\x09\x09(window jQuery: '#overlay') remove.\x0a\x09\x09(window jQuery: '.confirmation') remove\x0a\x09] valueWithTimeout: 300",
+source: "remove\x0a\x09(window jQuery: '.dialog') removeClass: 'active'.\x0a\x09[ \x0a\x09\x09(window jQuery: '#overlay') remove.\x0a\x09\x09(window jQuery: '.dialog') remove\x0a\x09] valueWithTimeout: 300",
 messageSends: ["removeClass:", "jQuery:", "valueWithTimeout:", "remove"],
 referencedClasses: []
 }),
@@ -1924,50 +1972,85 @@ smalltalk.HLConfirmation);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "renderContentOn:",
+selector: "renderButtonsOn:",
 category: 'rendering',
 fn: function (html){
 var self=this;
 var confirmButton;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$5,$6,$7,$8,$4,$2;
-_st(_st(html)._div())._id_("overlay");
+var $1,$3,$4,$5,$6,$2;
 $1=_st(html)._div();
-_st($1)._class_("confirmation");
+_st($1)._class_("buttons");
 $2=_st($1)._with_((function(){
 return smalltalk.withContext(function($ctx2) {
-_st(_st(html)._span())._with_(_st(self)._confirmationString());
-$3=_st(html)._div();
-_st($3)._class_("buttons");
-$4=_st($3)._with_((function(){
+$3=_st(html)._button();
+_st($3)._class_("button");
+_st($3)._with_("Cancel");
+$4=_st($3)._onClick_((function(){
 return smalltalk.withContext(function($ctx3) {
+return _st(self)._cancel();
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
+$4;
 $5=_st(html)._button();
-_st($5)._class_("button");
-_st($5)._with_("Cancel");
+_st($5)._class_("button default");
+_st($5)._with_("Confirm");
 $6=_st($5)._onClick_((function(){
-return smalltalk.withContext(function($ctx4) {
-return _st(self)._cancel();
-}, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
-$6;
-$7=_st(html)._button();
-_st($7)._class_("button default");
-_st($7)._with_("Confirm");
-$8=_st($7)._onClick_((function(){
-return smalltalk.withContext(function($ctx4) {
+return smalltalk.withContext(function($ctx3) {
 return _st(self)._confirm();
-}, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
-confirmButton=$8;
-return confirmButton;
 }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
-return $4;
+confirmButton=$6;
+return confirmButton;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
 _st(_st(confirmButton)._asJQuery())._focus();
-_st(_st(window)._jQuery_(".confirmation"))._addClass_("active");
+return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html,confirmButton:confirmButton},smalltalk.HLConfirmation)})},
+args: ["html"],
+source: "renderButtonsOn: html\x0a\x09| confirmButton |\x0a\x09\x0a\x09html div \x0a\x09\x09class: 'buttons';\x0a\x09\x09with: [\x0a\x09\x09\x09html button\x0a\x09\x09\x09\x09class: 'button';\x0a\x09\x09\x09\x09with: 'Cancel';\x0a\x09\x09\x09\x09onClick: [ self cancel ].\x0a\x09\x09\x09confirmButton := html button\x0a\x09\x09\x09\x09class: 'button default';\x0a\x09\x09\x09\x09with: 'Confirm';\x0a\x09\x09\x09\x09onClick: [ self confirm ] ].\x0a\x0a\x09confirmButton asJQuery focus",
+messageSends: ["class:", "div", "with:", "button", "onClick:", "cancel", "confirm", "focus", "asJQuery"],
+referencedClasses: []
+}),
+smalltalk.HLConfirmation);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renderContentOn:",
+category: 'rendering',
+fn: function (html){
+var self=this;
+var confirmButton;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$3,$4,$2;
+_st(_st(html)._div())._id_("overlay");
+$1=_st(html)._div();
+_st($1)._class_(_st("dialog ").__comma(_st(self)._cssClass()));
+$2=_st($1)._with_((function(){
+return smalltalk.withContext(function($ctx2) {
+$3=self;
+_st($3)._renderMainOn_(html);
+$4=_st($3)._renderButtonsOn_(html);
+return $4;
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+_st(_st(window)._jQuery_(".dialog"))._addClass_("active");
 _st(self)._setupKeyBindings();
 return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html,confirmButton:confirmButton},smalltalk.HLConfirmation)})},
 args: ["html"],
-source: "renderContentOn: html\x0a\x09| confirmButton |\x0a\x09\x0a\x09html div id: 'overlay'.\x0a\x09html div \x0a\x09\x09class: 'confirmation';\x0a\x09\x09with: [\x0a\x09\x09\x09html span with: self confirmationString.\x0a\x09\x09\x09html div \x0a\x09\x09\x09\x09class: 'buttons';\x0a\x09\x09\x09\x09with: [\x0a\x09\x09\x09\x09\x09html button\x0a\x09\x09\x09\x09\x09\x09class: 'button';\x0a\x09\x09\x09\x09\x09\x09with: 'Cancel';\x0a\x09\x09\x09\x09\x09\x09onClick: [ self cancel ].\x0a\x09\x09\x09\x09\x09confirmButton := html button\x0a\x09\x09\x09\x09\x09\x09class: 'button default';\x0a\x09\x09\x09\x09\x09\x09with: 'Confirm';\x0a\x09\x09\x09\x09\x09\x09onClick: [ self confirm ] ] ].\x0a\x0a\x09confirmButton asJQuery focus.\x0a\x09(window jQuery: '.confirmation') addClass: 'active'.\x0a\x09self setupKeyBindings",
-messageSends: ["id:", "div", "class:", "with:", "confirmationString", "span", "button", "onClick:", "cancel", "confirm", "focus", "asJQuery", "addClass:", "jQuery:", "setupKeyBindings"],
+source: "renderContentOn: html\x0a\x09| confirmButton |\x0a\x09\x0a\x09html div id: 'overlay'.\x0a\x09html div \x0a\x09\x09class: 'dialog ', self cssClass;\x0a\x09\x09with: [\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09renderMainOn: html;\x0a\x09\x09\x09\x09renderButtonsOn: html ].\x0a\x0a\x09(window jQuery: '.dialog') addClass: 'active'.\x0a\x09self setupKeyBindings",
+messageSends: ["id:", "div", "class:", ",", "cssClass", "with:", "renderMainOn:", "renderButtonsOn:", "addClass:", "jQuery:", "setupKeyBindings"],
+referencedClasses: []
+}),
+smalltalk.HLConfirmation);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renderMainOn:",
+category: 'rendering',
+fn: function (html){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(html)._span())._with_(_st(self)._confirmationString());
+return self}, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},smalltalk.HLConfirmation)})},
+args: ["html"],
+source: "renderMainOn: html\x0a\x09html span with: self confirmationString",
+messageSends: ["with:", "confirmationString", "span"],
 referencedClasses: []
 }),
 smalltalk.HLConfirmation);
@@ -1980,7 +2063,7 @@ fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-_st(_st(window)._jQuery_(".confirmation"))._keyup_((function(e){
+_st(_st(window)._jQuery_(".dialog"))._keyup_((function(e){
 return smalltalk.withContext(function($ctx2) {
 $1=_st(_st(e)._keyCode()).__eq((27));
 if(smalltalk.assert($1)){
@@ -1989,7 +2072,7 @@ return _st(self)._cancel();
 }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},smalltalk.HLConfirmation)})},
 args: [],
-source: "setupKeyBindings\x0a\x09(window jQuery: '.confirmation') keyup: [ :e |\x0a\x09\x09e keyCode = 27 ifTrue: [ self cancel ] ]",
+source: "setupKeyBindings\x0a\x09(window jQuery: '.dialog') keyup: [ :e |\x0a\x09\x09e keyCode = 27 ifTrue: [ self cancel ] ]",
 messageSends: ["keyup:", "ifTrue:", "cancel", "=", "keyCode", "jQuery:"],
 referencedClasses: []
 }),
@@ -1997,6 +2080,99 @@ smalltalk.HLConfirmation);
 
 
 
+smalltalk.addClass('HLRequest', smalltalk.HLConfirmation, ['input', 'value'], 'Helios-Core');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "confirm",
+category: 'actions',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._actionBlock())._value_(_st(_st(self["@input"])._asJQuery())._val());
+_st(self)._remove();
+return self}, function($ctx1) {$ctx1.fill(self,"confirm",{},smalltalk.HLRequest)})},
+args: [],
+source: "confirm\x0a\x09self actionBlock value: input asJQuery val.\x0a\x09self remove",
+messageSends: ["value:", "val", "asJQuery", "actionBlock", "remove"],
+referencedClasses: []
+}),
+smalltalk.HLRequest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "cssClass",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "large";
+}, function($ctx1) {$ctx1.fill(self,"cssClass",{},smalltalk.HLRequest)})},
+args: [],
+source: "cssClass\x0a\x09^ 'large'",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.HLRequest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renderMainOn:",
+category: 'rendering',
+fn: function (html){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+smalltalk.HLConfirmation.fn.prototype._renderMainOn_.apply(_st(self), [html]);
+self["@input"]=_st(html)._textarea();
+_st(_st(self["@input"])._asJQuery())._val_(_st(self)._value());
+return self}, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},smalltalk.HLRequest)})},
+args: ["html"],
+source: "renderMainOn: html\x0a\x09super renderMainOn: html.\x0a\x09input := html textarea.\x0a\x09input asJQuery val: self value",
+messageSends: ["renderMainOn:", "textarea", "val:", "value", "asJQuery"],
+referencedClasses: []
+}),
+smalltalk.HLRequest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "value",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@value"];
+if(($receiver = $2) == nil || $receiver == undefined){
+$1="";
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.HLRequest)})},
+args: [],
+source: "value\x0a\x09^ value ifNil: [ '' ]",
+messageSends: ["ifNil:"],
+referencedClasses: []
+}),
+smalltalk.HLRequest);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "value:",
+category: 'accessing',
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self["@value"]=aString;
+return self}, function($ctx1) {$ctx1.fill(self,"value:",{aString:aString},smalltalk.HLRequest)})},
+args: ["aString"],
+source: "value: aString\x0a\x09value := aString",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.HLRequest);
+
+
+
 smalltalk.addClass('HLDebugger', smalltalk.HLWidget, [], 'Helios-Core');
 
 
@@ -3767,6 +3943,45 @@ referencedClasses: []
 }),
 smalltalk.HLManager);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "request:do:",
+category: 'actions',
+fn: function (aString,aBlock){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(self)._request_value_do_(aString,"",aBlock);
+return self}, function($ctx1) {$ctx1.fill(self,"request:do:",{aString:aString,aBlock:aBlock},smalltalk.HLManager)})},
+args: ["aString", "aBlock"],
+source: "request: aString do: aBlock\x0a\x09self \x0a\x09\x09request: aString\x0a\x09\x09value: ''\x0a\x09\x09do: aBlock",
+messageSends: ["request:value:do:"],
+referencedClasses: []
+}),
+smalltalk.HLManager);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "request:value:do:",
+category: 'actions',
+fn: function (aString,valueString,aBlock){
+var self=this;
+function $HLRequest(){return smalltalk.HLRequest||(typeof HLRequest=="undefined"?nil:HLRequest)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+$1=_st($HLRequest())._new();
+_st($1)._confirmationString_(aString);
+_st($1)._actionBlock_(aBlock);
+_st($1)._value_(valueString);
+$2=_st($1)._yourself();
+_st($2)._appendToJQuery_(_st("body")._asJQuery());
+return self}, function($ctx1) {$ctx1.fill(self,"request:value:do:",{aString:aString,valueString:valueString,aBlock:aBlock},smalltalk.HLManager)})},
+args: ["aString", "valueString", "aBlock"],
+source: "request: aString value: valueString do: aBlock\x0a\x09(HLRequest new\x0a\x09\x09confirmationString: aString;\x0a\x09\x09actionBlock: aBlock;\x0a\x09\x09value: valueString;\x0a\x09\x09yourself)\x0a\x09\x09\x09appendToJQuery: 'body' asJQuery",
+messageSends: ["appendToJQuery:", "asJQuery", "confirmationString:", "new", "actionBlock:", "value:", "yourself"],
+referencedClasses: ["HLRequest"]
+}),
+smalltalk.HLManager);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "show:",

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

@@ -836,6 +836,18 @@ smalltalk.HLCodeWidget.klass);
 
 
 smalltalk.addClass('HLNavigationCodeWidget', smalltalk.HLCodeWidget, ['methodContents'], 'Helios-Workspace');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "configureEditor",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+smalltalk.HLCodeWidget.fn.prototype._configureEditor.apply(_st(self), []);
+_st(self)._contents_(_st(self)._methodContents());
+return self}, function($ctx1) {$ctx1.fill(self,"configureEditor",{},smalltalk.HLNavigationCodeWidget)})},
+messageSends: ["configureEditor", "contents:", "methodContents"]}),
+smalltalk.HLNavigationCodeWidget);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "contents:",

+ 17 - 0
js/Helios-Workspace.js

@@ -1111,6 +1111,23 @@ smalltalk.HLCodeWidget.klass);
 
 
 smalltalk.addClass('HLNavigationCodeWidget', smalltalk.HLCodeWidget, ['methodContents'], 'Helios-Workspace');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "configureEditor",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+smalltalk.HLCodeWidget.fn.prototype._configureEditor.apply(_st(self), []);
+_st(self)._contents_(_st(self)._methodContents());
+return self}, function($ctx1) {$ctx1.fill(self,"configureEditor",{},smalltalk.HLNavigationCodeWidget)})},
+args: [],
+source: "configureEditor\x0a\x09super configureEditor.\x0a\x09self contents: self methodContents",
+messageSends: ["configureEditor", "contents:", "methodContents"],
+referencedClasses: []
+}),
+smalltalk.HLNavigationCodeWidget);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "contents:",

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

@@ -1878,6 +1878,17 @@ return self}, function($ctx1) {$ctx1.fill(self,"renameProtocol:to:in:",{aString:
 messageSends: ["do:", "protocol:", "select:", "=", "protocol", "methods"]}),
 smalltalk.Environment);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "setClassCommentOf:to:",
+fn: function (aClass,aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(aClass)._comment_(aString);
+return self}, function($ctx1) {$ctx1.fill(self,"setClassCommentOf:to:",{aClass:aClass,aString:aString},smalltalk.Environment)})},
+messageSends: ["comment:"]}),
+smalltalk.Environment);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "systemAnnouncer",

+ 16 - 0
js/Kernel-Objects.js

@@ -2592,6 +2592,22 @@ referencedClasses: []
 }),
 smalltalk.Environment);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "setClassCommentOf:to:",
+category: 'actions',
+fn: function (aClass,aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(aClass)._comment_(aString);
+return self}, function($ctx1) {$ctx1.fill(self,"setClassCommentOf:to:",{aClass:aClass,aString:aString},smalltalk.Environment)})},
+args: ["aClass", "aString"],
+source: "setClassCommentOf: aClass to: aString\x0a\x09aClass comment: aString",
+messageSends: ["comment:"],
+referencedClasses: []
+}),
+smalltalk.Environment);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "systemAnnouncer",

+ 4 - 0
st/Helios-Announcements.st

@@ -62,6 +62,10 @@ HLAnnouncement subclass: #HLDiveRequested
 	instanceVariableNames: ''
 	package: 'Helios-Announcements'!
 
+HLAnnouncement subclass: #HLEditComment
+	instanceVariableNames: ''
+	package: 'Helios-Announcements'!
+
 HLAnnouncement subclass: #HLErrorRaised
 	instanceVariableNames: 'error'
 	package: 'Helios-Announcements'!

+ 66 - 3
st/Helios-Browser.st

@@ -256,6 +256,18 @@ focusOnProtocols
 
 focusOnSourceCode
 	self announcer announce: HLSourceCodeFocusRequested new
+!
+
+setClassComment: aString
+	self environment
+		setClassCommentOf: self selectedClass theNonMetaClass
+		to: aString
+! !
+
+!HLBrowserModel methodsFor: 'commands actions'!
+
+editComment
+	self announcer announce: HLEditComment new
 ! !
 
 !HLBrowserModel methodsFor: 'testing'!
@@ -438,6 +450,10 @@ observeSystem
 		
 		on: ClassMigrated
 		send: #onClassMigrated:
+		to: self;
+		
+		on: ClassCommentChanged
+        send: #onClassCommentChanged:
 		to: self
 !
 
@@ -485,6 +501,15 @@ onClassAdded: anAnnouncement
     self refresh
 !
 
+onClassCommentChanged: anAnnouncement
+	| class |
+	class := anAnnouncement theClass.
+
+	class package = self model selectedPackage ifFalse: [ ^ self ].
+    
+    self refresh
+!
+
 onClassMigrated: anAnnouncement
 	| class oldClass |
 	
@@ -524,7 +549,6 @@ onClassRemoved: anAnnouncement
 	class := anAnnouncement theClass.
 
 	class package = self model selectedPackage ifFalse: [ ^ self ].
-    class = self model selectedClass ifTrue: [ self selectItem: nil ].
     
     self setItemsForSelectedPackage.
     self refresh
@@ -685,7 +709,9 @@ model
 
 model: aModel
 	model := aModel.
-	self observeModel
+	self 
+		observeSystem;
+		observeModel
 !
 
 selectedItem
@@ -694,10 +720,25 @@ selectedItem
 
 !HLDocumentationWidget methodsFor: 'actions'!
 
+editDocumentation
+	self model editComment
+!
+
 observeModel
 	self model announcer 
 		on: HLClassSelected
 		send: #onClassSelected:
+		to: self;
+		
+		on: HLEditComment
+		send: #onEditDocumentation
+		to: self
+!
+
+observeSystem
+	self model systemAnnouncer 
+		on: ClassCommentChanged
+		send: #onClassCommentChanged:
 		to: self
 !
 
@@ -723,8 +764,24 @@ defaultHead
 
 !HLDocumentationWidget methodsFor: 'reactions'!
 
+onClassCommentChanged: anAnnouncement
+	anAnnouncement theClass = self model selectedClass theNonMetaClass
+		ifTrue: [ self refresh ]
+!
+
 onClassSelected: anAnnouncement
 	self refresh
+!
+
+onEditDocumentation
+	self 
+		request: self model selectedClass theNonMetaClass name, ' comment'
+		value: self model selectedClass theNonMetaClass comment
+		do: [ :comment | self setClassComment: comment ]
+!
+
+setClassComment: aString
+	self model setClassComment: aString
 ! !
 
 !HLDocumentationWidget methodsFor: 'rendering'!
@@ -741,7 +798,13 @@ renderContentOn: html
 renderDocOn: html
 	self selectedItem ifNotNil: [
 		self renderInheritanceOn: html.
-		html h1 with: 'Overview'.
+		html h1 
+			with: 'Overview';
+			with: [ 
+				html button
+					class: 'button default';
+					with: 'Edit';
+					onClick: [ self editDocumentation ] ].
 		(html div 
 			class: 'markdown';
 			asJQuery) html: ((Showdown at: 'converter') new makeHtml: self documentation) ]

+ 26 - 0
st/Helios-Commands-Browser.st

@@ -129,6 +129,32 @@ label
 	^ 'Source code'
 ! !
 
+HLBrowserCommand subclass: #HLEditCommentCommand
+	instanceVariableNames: ''
+	package: 'Helios-Commands-Browser'!
+
+!HLEditCommentCommand methodsFor: 'executing'!
+
+execute
+	self model editComment
+! !
+
+!HLEditCommentCommand methodsFor: 'testing'!
+
+isActive
+	^ self model showComment and: [ self model selectedClass notNil ]
+! !
+
+!HLEditCommentCommand class methodsFor: 'accessing'!
+
+key
+	^ 'd'
+!
+
+label
+	^ 'Edit documentation'
+! !
+
 HLBrowserCommand subclass: #HLToggleCommand
 	instanceVariableNames: ''
 	package: 'Helios-Commands-Browser'!

+ 95 - 19
st/Helios-Core.st

@@ -516,6 +516,17 @@ execute: aCommand
 		applyBinding: aCommand asBinding
 !
 
+request: aString do: aBlock
+	self manager request: aString do: aBlock
+!
+
+request: aString value: valueString do: aBlock
+	self manager 
+		request: aString 
+		value: valueString
+		do: aBlock
+!
+
 unregister
 	"This method is called whenever the receiver is closed (as a tab).
 	Widgets subscribing to announcements should unregister there"
@@ -604,6 +615,10 @@ confirmationString
 
 confirmationString: aString
 	confirmationString := aString
+!
+
+cssClass
+	^ ''
 ! !
 
 !HLConfirmation methodsFor: 'actions'!
@@ -619,45 +634,90 @@ confirm
 !
 
 remove
-	(window jQuery: '.confirmation') removeClass: 'active'.
+	(window jQuery: '.dialog') removeClass: 'active'.
 	[ 
 		(window jQuery: '#overlay') remove.
-		(window jQuery: '.confirmation') remove
+		(window jQuery: '.dialog') remove
 	] valueWithTimeout: 300
 ! !
 
 !HLConfirmation methodsFor: 'rendering'!
 
+renderButtonsOn: html
+	| confirmButton |
+	
+	html div 
+		class: 'buttons';
+		with: [
+			html button
+				class: 'button';
+				with: 'Cancel';
+				onClick: [ self cancel ].
+			confirmButton := html button
+				class: 'button default';
+				with: 'Confirm';
+				onClick: [ self confirm ] ].
+
+	confirmButton asJQuery focus
+!
+
 renderContentOn: html
 	| confirmButton |
 	
 	html div id: 'overlay'.
 	html div 
-		class: 'confirmation';
+		class: 'dialog ', self cssClass;
 		with: [
-			html span with: self confirmationString.
-			html div 
-				class: 'buttons';
-				with: [
-					html button
-						class: 'button';
-						with: 'Cancel';
-						onClick: [ self cancel ].
-					confirmButton := html button
-						class: 'button default';
-						with: 'Confirm';
-						onClick: [ self confirm ] ] ].
-
-	confirmButton asJQuery focus.
-	(window jQuery: '.confirmation') addClass: 'active'.
+			self
+				renderMainOn: html;
+				renderButtonsOn: html ].
+
+	(window jQuery: '.dialog') addClass: 'active'.
 	self setupKeyBindings
 !
 
+renderMainOn: html
+	html span with: self confirmationString
+!
+
 setupKeyBindings
-	(window jQuery: '.confirmation') keyup: [ :e |
+	(window jQuery: '.dialog') keyup: [ :e |
 		e keyCode = 27 ifTrue: [ self cancel ] ]
 ! !
 
+HLConfirmation subclass: #HLRequest
+	instanceVariableNames: 'input value'
+	package: 'Helios-Core'!
+
+!HLRequest methodsFor: 'accessing'!
+
+cssClass
+	^ 'large'
+!
+
+value
+	^ value ifNil: [ '' ]
+!
+
+value: aString
+	value := aString
+! !
+
+!HLRequest methodsFor: 'actions'!
+
+confirm
+	self actionBlock value: input asJQuery val.
+	self remove
+! !
+
+!HLRequest methodsFor: 'rendering'!
+
+renderMainOn: html
+	super renderMainOn: html.
+	input := html textarea.
+	input asJQuery val: self value
+! !
+
 HLWidget subclass: #HLDebugger
 	instanceVariableNames: ''
 	package: 'Helios-Core'!
@@ -1199,6 +1259,22 @@ removeTab: aTab
 	self refresh.
 	self history ifNotEmpty: [
 		self history last activate ]
+!
+
+request: aString do: aBlock
+	self 
+		request: aString
+		value: ''
+		do: aBlock
+!
+
+request: aString value: valueString do: aBlock
+	(HLRequest new
+		confirmationString: aString;
+		actionBlock: aBlock;
+		value: valueString;
+		yourself)
+			appendToJQuery: 'body' asJQuery
 ! !
 
 !HLManager methodsFor: 'defaults'!

+ 5 - 0
st/Helios-Workspace.st

@@ -422,6 +422,11 @@ HLCodeWidget subclass: #HLNavigationCodeWidget
 
 !HLNavigationCodeWidget methodsFor: 'accessing'!
 
+configureEditor
+	super configureEditor.
+	self contents: self methodContents
+!
+
 contents: aString
 	self methodContents: aString.
 	super contents: aString

+ 4 - 0
st/Kernel-Objects.st

@@ -784,6 +784,10 @@ renameProtocol: aString to: anotherString in: aClass
 	(aClass methods
 		select: [ :each | each protocol = aString ])
 		do: [ :each | each protocol: anotherString ]
+!
+
+setClassCommentOf: aClass to: aString
+	aClass comment: aString
 ! !
 
 !Environment methodsFor: 'compiling'!