瀏覽代碼

- Helios: progress bar improvements
- use the progress bars in various places

Nicolas Petton 11 年之前
父節點
當前提交
9db419eb9a
共有 7 個文件被更改,包括 627 次插入114 次删除
  1. 4 0
      css/helios.css
  2. 20 12
      js/Compiler-Core.deploy.js
  3. 27 14
      js/Compiler-Core.js
  4. 248 37
      js/Helios-Core.deploy.js
  5. 321 44
      js/Helios-Core.js
  6. 3 3
      js/Kernel-Classes.deploy.js
  7. 4 4
      js/Kernel-Classes.js

+ 4 - 0
css/helios.css

@@ -721,6 +721,10 @@ i {
     height: 200px;
 }
 
+.dialog .progress {
+    height: 5px;
+}
+
 .dialog .progress .bar {
     background-color: #e9eaf5;
     background-image: -webkit-linear-gradient(top, #B1BDD5, #8999b8);

+ 20 - 12
js/Compiler-Core.deploy.js

@@ -433,23 +433,14 @@ smalltalk.method({
 selector: "recompileAll",
 fn: function (){
 var self=this;
-function $Transcript(){return smalltalk.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-_st(_st(_st($Smalltalk())._current())._classes())._do_((function(each){
+_st(_st(_st($Smalltalk())._current())._classes())._do_displayingProgress_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$1=$Transcript();
-_st($1)._show_(each);
-$2=_st($1)._cr();
-$2;
-return _st((function(){
-return smalltalk.withContext(function($ctx3) {
 return _st(self)._recompile_(each);
-}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._valueWithTimeout_((100));
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),"Compiling all classes...");
 return self}, function($ctx1) {$ctx1.fill(self,"recompileAll",{},smalltalk.Compiler)})},
-messageSends: ["do:", "show:", "cr", "valueWithTimeout:", "recompile:", "classes", "current"]}),
+messageSends: ["do:displayingProgress:", "recompile:", "classes", "current"]}),
 smalltalk.Compiler);
 
 smalltalk.addMethod(
@@ -534,6 +525,23 @@ smalltalk.Compiler.klass);
 
 
 smalltalk.addClass('DoIt', smalltalk.Object, [], 'Compiler-Core');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "xxxDoIt",
+fn: function (){
+var self=this;
+function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st((function(){
+return smalltalk.withContext(function($ctx2) {
+return _st(_st($Compiler())._new())._recompileAll();
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._value();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"xxxDoIt",{},smalltalk.DoIt)})},
+messageSends: ["value", "recompileAll", "new"]}),
+smalltalk.DoIt);
+
 
 
 smalltalk.addClass('NodeVisitor', smalltalk.Object, [], 'Compiler-Core');

+ 27 - 14
js/Compiler-Core.js

@@ -577,26 +577,17 @@ selector: "recompileAll",
 category: 'compiling',
 fn: function (){
 var self=this;
-function $Transcript(){return smalltalk.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-_st(_st(_st($Smalltalk())._current())._classes())._do_((function(each){
+_st(_st(_st($Smalltalk())._current())._classes())._do_displayingProgress_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$1=$Transcript();
-_st($1)._show_(each);
-$2=_st($1)._cr();
-$2;
-return _st((function(){
-return smalltalk.withContext(function($ctx3) {
 return _st(self)._recompile_(each);
-}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._valueWithTimeout_((100));
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),"Compiling all classes...");
 return self}, function($ctx1) {$ctx1.fill(self,"recompileAll",{},smalltalk.Compiler)})},
 args: [],
-source: "recompileAll\x0a\x09Smalltalk current classes do: [:each |\x0a\x09\x09Transcript show: each; cr.\x0a\x09\x09[self recompile: each] valueWithTimeout: 100]",
-messageSends: ["do:", "show:", "cr", "valueWithTimeout:", "recompile:", "classes", "current"],
-referencedClasses: ["Transcript", "Smalltalk"]
+source: "recompileAll\x0a\x09Smalltalk current classes \x0a\x09\x09do: [:each | self recompile: each ]\x0a\x09\x09displayingProgress: 'Compiling all classes...'",
+messageSends: ["do:displayingProgress:", "recompile:", "classes", "current"],
+referencedClasses: ["Smalltalk"]
 }),
 smalltalk.Compiler);
 
@@ -713,6 +704,28 @@ smalltalk.Compiler.klass);
 
 smalltalk.addClass('DoIt', smalltalk.Object, [], 'Compiler-Core');
 smalltalk.DoIt.comment="`DoIt` is the class used to compile and evaluate expressions. See `Compiler >> evaluateExpression:`."
+smalltalk.addMethod(
+smalltalk.method({
+selector: "xxxDoIt",
+category: 'xxxDoIt',
+fn: function (){
+var self=this;
+function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st((function(){
+return smalltalk.withContext(function($ctx2) {
+return _st(_st($Compiler())._new())._recompileAll();
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._value();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"xxxDoIt",{},smalltalk.DoIt)})},
+args: [],
+source: "xxxDoIt ^[Compiler new recompileAll] value",
+messageSends: ["value", "recompileAll", "new"],
+referencedClasses: ["Compiler"]
+}),
+smalltalk.DoIt);
+
 
 
 smalltalk.addClass('NodeVisitor', smalltalk.Object, [], 'Compiler-Core');

+ 248 - 37
js/Helios-Core.deploy.js

@@ -864,15 +864,9 @@ fn: function (aBlock,aCollection,aString){
 var self=this;
 function $HLProgress(){return smalltalk.HLProgress||(typeof HLProgress=="undefined"?nil:HLProgress)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=_st($HLProgress())._new();
-_st($1)._label_(aString);
-_st($1)._workBlock_(aBlock);
-_st($1)._collection_(aCollection);
-_st($1)._appendToJQuery_(_st("body")._asJQuery());
-$2=_st($1)._start();
+_st(_st($HLProgress())._default())._do_on_displaying_(aBlock,aCollection,aString);
 return self}, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString},smalltalk.HLProgressHandler)})},
-messageSends: ["label:", "new", "workBlock:", "collection:", "appendToJQuery:", "asJQuery", "start"]}),
+messageSends: ["do:on:displaying:", "default"]}),
 smalltalk.HLProgressHandler);
 
 
@@ -3299,7 +3293,179 @@ smalltalk.HLRequest);
 
 
 
-smalltalk.addClass('HLProgress', smalltalk.HLModal, ['label', 'workBlock', 'collection', 'progressBar'], 'Helios-Core');
+smalltalk.addClass('HLProgress', smalltalk.HLModal, ['progressBars', 'visible'], 'Helios-Core');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "addProgressBar:",
+fn: function (aProgressBar){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(self)._show();
+_st(_st(self)._progressBars())._add_(aProgressBar);
+_st(aProgressBar)._appendToJQuery_(_st(_st(_st(self)._wrapper())._asJQuery())._find_(".dialog"));
+return self}, function($ctx1) {$ctx1.fill(self,"addProgressBar:",{aProgressBar:aProgressBar},smalltalk.HLProgress)})},
+messageSends: ["show", "add:", "progressBars", "appendToJQuery:", "find:", "asJQuery", "wrapper"]}),
+smalltalk.HLProgress);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "do:on:displaying:",
+fn: function (aBlock,aCollection,aString){
+var self=this;
+var progressBar;
+function $HLProgressBar(){return smalltalk.HLProgressBar||(typeof HLProgressBar=="undefined"?nil:HLProgressBar)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+$1=_st($HLProgressBar())._new();
+_st($1)._parent_(self);
+_st($1)._label_(aString);
+_st($1)._workBlock_(aBlock);
+_st($1)._collection_(aCollection);
+$2=_st($1)._yourself();
+progressBar=$2;
+_st(self)._addProgressBar_(progressBar);
+_st(progressBar)._start();
+return self}, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString,progressBar:progressBar},smalltalk.HLProgress)})},
+messageSends: ["parent:", "new", "label:", "workBlock:", "collection:", "yourself", "addProgressBar:", "start"]}),
+smalltalk.HLProgress);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "isVisible",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@visible"];
+if(($receiver = $2) == nil || $receiver == undefined){
+$1=false;
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"isVisible",{},smalltalk.HLProgress)})},
+messageSends: ["ifNil:"]}),
+smalltalk.HLProgress);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "progressBars",
+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["@progressBars"];
+if(($receiver = $2) == nil || $receiver == undefined){
+self["@progressBars"]=_st($OrderedCollection())._new();
+$1=self["@progressBars"];
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"progressBars",{},smalltalk.HLProgress)})},
+messageSends: ["ifNil:", "new"]}),
+smalltalk.HLProgress);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "remove",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(self)._isVisible();
+if(smalltalk.assert($1)){
+self["@visible"]=false;
+self["@visible"];
+smalltalk.HLModal.fn.prototype._remove.apply(_st(self), []);
+};
+return self}, function($ctx1) {$ctx1.fill(self,"remove",{},smalltalk.HLProgress)})},
+messageSends: ["ifTrue:", "remove", "isVisible"]}),
+smalltalk.HLProgress);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "removeProgressBar:",
+fn: function (aProgressBar){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._progressBars())._remove_ifAbsent_(aProgressBar,(function(){
+return smalltalk.withContext(function($ctx2) {
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+_st(_st(_st(aProgressBar)._wrapper())._asJQuery())._remove();
+_st(_st(self)._progressBars())._ifEmpty_((function(){
+return smalltalk.withContext(function($ctx2) {
+return _st(self)._remove();
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"removeProgressBar:",{aProgressBar:aProgressBar},smalltalk.HLProgress)})},
+messageSends: ["remove:ifAbsent:", "progressBars", "remove", "asJQuery", "wrapper", "ifEmpty:"]}),
+smalltalk.HLProgress);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renderButtonsOn:",
+fn: function (html){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLProgress)})},
+messageSends: []}),
+smalltalk.HLProgress);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renderMainOn:",
+fn: function (html){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._progressBars())._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(html)._with_(each);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},smalltalk.HLProgress)})},
+messageSends: ["do:", "with:", "progressBars"]}),
+smalltalk.HLProgress);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "show",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(self)._isVisible();
+if(! smalltalk.assert($1)){
+self["@visible"]=true;
+self["@visible"];
+_st(self)._appendToJQuery_(_st("body")._asJQuery());
+};
+return self}, function($ctx1) {$ctx1.fill(self,"show",{},smalltalk.HLProgress)})},
+messageSends: ["ifFalse:", "appendToJQuery:", "asJQuery", "isVisible"]}),
+smalltalk.HLProgress);
+
+
+smalltalk.HLProgress.klass.iVarNames = ['default'];
+smalltalk.addMethod(
+smalltalk.method({
+selector: "default",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@default"];
+if(($receiver = $2) == nil || $receiver == undefined){
+self["@default"]=_st(self)._new();
+$1=self["@default"];
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"default",{},smalltalk.HLProgress.klass)})},
+messageSends: ["ifNil:", "new"]}),
+smalltalk.HLProgress.klass);
+
+
+smalltalk.addClass('HLProgressBar', smalltalk.HLWidget, ['label', 'parent', 'workBlock', 'collection', 'bar'], 'Helios-Core');
 smalltalk.addMethod(
 smalltalk.method({
 selector: "collection",
@@ -3309,9 +3475,9 @@ return smalltalk.withContext(function($ctx1) {
 var $1;
 $1=self["@collection"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"collection",{},smalltalk.HLProgress)})},
+}, function($ctx1) {$ctx1.fill(self,"collection",{},smalltalk.HLProgressBar)})},
 messageSends: []}),
-smalltalk.HLProgress);
+smalltalk.HLProgressBar);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -3320,9 +3486,9 @@ fn: function (aCollection){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 self["@collection"]=aCollection;
-return self}, function($ctx1) {$ctx1.fill(self,"collection:",{aCollection:aCollection},smalltalk.HLProgress)})},
+return self}, function($ctx1) {$ctx1.fill(self,"collection:",{aCollection:aCollection},smalltalk.HLProgressBar)})},
 messageSends: []}),
-smalltalk.HLProgress);
+smalltalk.HLProgressBar);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -3345,9 +3511,9 @@ return smalltalk.withContext(function($ctx2) {
 return _st(self)._remove();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithTimeout_((500));
 };
-return self}, function($ctx1) {$ctx1.fill(self,"evaluateAt:",{anInteger:anInteger},smalltalk.HLProgress)})},
+return self}, function($ctx1) {$ctx1.fill(self,"evaluateAt:",{anInteger:anInteger},smalltalk.HLProgressBar)})},
 messageSends: ["updateProgress:", "*", "/", "size", "collection", "ifTrue:ifFalse:", "valueWithTimeout:", "value:", "at:", "workBlock", "evaluateAt:", "+", "remove", ">"]}),
-smalltalk.HLProgress);
+smalltalk.HLProgressBar);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -3358,9 +3524,9 @@ return smalltalk.withContext(function($ctx1) {
 var $1;
 $1=self["@label"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLProgress)})},
+}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLProgressBar)})},
 messageSends: []}),
-smalltalk.HLProgress);
+smalltalk.HLProgressBar);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -3369,23 +3535,48 @@ fn: function (aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 self["@label"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"label:",{aString:aString},smalltalk.HLProgress)})},
+return self}, function($ctx1) {$ctx1.fill(self,"label:",{aString:aString},smalltalk.HLProgressBar)})},
 messageSends: []}),
-smalltalk.HLProgress);
+smalltalk.HLProgressBar);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "renderButtonsOn:",
-fn: function (html){
+selector: "parent",
+fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLProgress)})},
+var $1;
+$1=self["@parent"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"parent",{},smalltalk.HLProgressBar)})},
 messageSends: []}),
-smalltalk.HLProgress);
+smalltalk.HLProgressBar);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "renderMainOn:",
+selector: "parent:",
+fn: function (aProgress){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self["@parent"]=aProgress;
+return self}, function($ctx1) {$ctx1.fill(self,"parent:",{aProgress:aProgress},smalltalk.HLProgressBar)})},
+messageSends: []}),
+smalltalk.HLProgressBar);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "remove",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._parent())._removeProgressBar_(self);
+return self}, function($ctx1) {$ctx1.fill(self,"remove",{},smalltalk.HLProgressBar)})},
+messageSends: ["removeProgressBar:", "parent"]}),
+smalltalk.HLProgressBar);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renderContentOn:",
 fn: function (html){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
@@ -3398,12 +3589,12 @@ return smalltalk.withContext(function($ctx2) {
 $3=_st(html)._div();
 _st($3)._class_("bar");
 $4=_st($3)._style_("width: 0%");
-self["@progressBar"]=$4;
-return self["@progressBar"];
+self["@bar"]=$4;
+return self["@bar"];
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},smalltalk.HLProgress)})},
+return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLProgressBar)})},
 messageSends: ["with:", "label", "span", "class:", "div", "style:"]}),
-smalltalk.HLProgress);
+smalltalk.HLProgressBar);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -3412,9 +3603,9 @@ fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 _st(self)._evaluateAt_((1));
-return self}, function($ctx1) {$ctx1.fill(self,"start",{},smalltalk.HLProgress)})},
+return self}, function($ctx1) {$ctx1.fill(self,"start",{},smalltalk.HLProgressBar)})},
 messageSends: ["evaluateAt:"]}),
-smalltalk.HLProgress);
+smalltalk.HLProgressBar);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -3422,10 +3613,10 @@ selector: "updateProgress:",
 fn: function (anInteger){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(self["@progressBar"])._asJQuery())._css_put_("width",_st(_st(anInteger)._asString()).__comma("%"));
-return self}, function($ctx1) {$ctx1.fill(self,"updateProgress:",{anInteger:anInteger},smalltalk.HLProgress)})},
+_st(_st(self["@bar"])._asJQuery())._css_put_("width",_st(_st(anInteger)._asString()).__comma("%"));
+return self}, function($ctx1) {$ctx1.fill(self,"updateProgress:",{anInteger:anInteger},smalltalk.HLProgressBar)})},
 messageSends: ["css:put:", ",", "asString", "asJQuery"]}),
-smalltalk.HLProgress);
+smalltalk.HLProgressBar);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -3436,9 +3627,9 @@ return smalltalk.withContext(function($ctx1) {
 var $1;
 $1=self["@workBlock"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"workBlock",{},smalltalk.HLProgress)})},
+}, function($ctx1) {$ctx1.fill(self,"workBlock",{},smalltalk.HLProgressBar)})},
 messageSends: []}),
-smalltalk.HLProgress);
+smalltalk.HLProgressBar);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -3447,10 +3638,30 @@ fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 self["@workBlock"]=aBlock;
-return self}, function($ctx1) {$ctx1.fill(self,"workBlock:",{aBlock:aBlock},smalltalk.HLProgress)})},
+return self}, function($ctx1) {$ctx1.fill(self,"workBlock:",{aBlock:aBlock},smalltalk.HLProgressBar)})},
 messageSends: []}),
-smalltalk.HLProgress);
+smalltalk.HLProgressBar);
+
 
+smalltalk.HLProgressBar.klass.iVarNames = ['default'];
+smalltalk.addMethod(
+smalltalk.method({
+selector: "default",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@default"];
+if(($receiver = $2) == nil || $receiver == undefined){
+self["@default"]=_st(self)._new();
+$1=self["@default"];
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"default",{},smalltalk.HLProgressBar.klass)})},
+messageSends: ["ifNil:", "new"]}),
+smalltalk.HLProgressBar.klass);
 
 
 smalltalk.addClass('HLSUnit', smalltalk.HLWidget, [], 'Helios-Core');

+ 321 - 44
js/Helios-Core.js

@@ -1123,17 +1123,11 @@ fn: function (aBlock,aCollection,aString){
 var self=this;
 function $HLProgress(){return smalltalk.HLProgress||(typeof HLProgress=="undefined"?nil:HLProgress)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=_st($HLProgress())._new();
-_st($1)._label_(aString);
-_st($1)._workBlock_(aBlock);
-_st($1)._collection_(aCollection);
-_st($1)._appendToJQuery_(_st("body")._asJQuery());
-$2=_st($1)._start();
+_st(_st($HLProgress())._default())._do_on_displaying_(aBlock,aCollection,aString);
 return self}, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString},smalltalk.HLProgressHandler)})},
 args: ["aBlock", "aCollection", "aString"],
-source: "do: aBlock on: aCollection displaying: aString\x0a\x09HLProgress new\x0a\x09\x09label: aString;\x0a\x09\x09workBlock: aBlock;\x0a\x09\x09collection: aCollection;\x0a\x09\x09appendToJQuery: 'body' asJQuery;\x0a\x09\x09start",
-messageSends: ["label:", "new", "workBlock:", "collection:", "appendToJQuery:", "asJQuery", "start"],
+source: "do: aBlock on: aCollection displaying: aString\x0a\x09HLProgress default\x0a\x09\x09do: aBlock \x0a\x09\x09on: aCollection \x0a\x09\x09displaying: aString",
+messageSends: ["do:on:displaying:", "default"],
 referencedClasses: ["HLProgress"]
 }),
 smalltalk.HLProgressHandler);
@@ -4303,8 +4297,231 @@ smalltalk.HLRequest);
 
 
 
-smalltalk.addClass('HLProgress', smalltalk.HLModal, ['label', 'workBlock', 'collection', 'progressBar'], 'Helios-Core');
-smalltalk.HLProgress.comment="I am a widget used to display progress modal dialogs.\x0a\x0aSee `HLProgressHandler`"
+smalltalk.addClass('HLProgress', smalltalk.HLModal, ['progressBars', 'visible'], 'Helios-Core');
+smalltalk.HLProgress.comment="I am a widget used to display progress modal dialogs.\x0a\x0aMy default instance is accessed with `HLProgress >> #default`.\x0a\x0aSee `HLProgressHandler`."
+smalltalk.addMethod(
+smalltalk.method({
+selector: "addProgressBar:",
+category: 'actions',
+fn: function (aProgressBar){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(self)._show();
+_st(_st(self)._progressBars())._add_(aProgressBar);
+_st(aProgressBar)._appendToJQuery_(_st(_st(_st(self)._wrapper())._asJQuery())._find_(".dialog"));
+return self}, function($ctx1) {$ctx1.fill(self,"addProgressBar:",{aProgressBar:aProgressBar},smalltalk.HLProgress)})},
+args: ["aProgressBar"],
+source: "addProgressBar: aProgressBar\x0a\x09self show.\x0a\x09self progressBars add: aProgressBar.\x0a\x09aProgressBar appendToJQuery: (self wrapper asJQuery find: '.dialog')",
+messageSends: ["show", "add:", "progressBars", "appendToJQuery:", "find:", "asJQuery", "wrapper"],
+referencedClasses: []
+}),
+smalltalk.HLProgress);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "do:on:displaying:",
+category: 'actions',
+fn: function (aBlock,aCollection,aString){
+var self=this;
+var progressBar;
+function $HLProgressBar(){return smalltalk.HLProgressBar||(typeof HLProgressBar=="undefined"?nil:HLProgressBar)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+$1=_st($HLProgressBar())._new();
+_st($1)._parent_(self);
+_st($1)._label_(aString);
+_st($1)._workBlock_(aBlock);
+_st($1)._collection_(aCollection);
+$2=_st($1)._yourself();
+progressBar=$2;
+_st(self)._addProgressBar_(progressBar);
+_st(progressBar)._start();
+return self}, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString,progressBar:progressBar},smalltalk.HLProgress)})},
+args: ["aBlock", "aCollection", "aString"],
+source: "do: aBlock on: aCollection displaying: aString\x0a\x09| progressBar |\x0a\x09\x0a\x09progressBar := HLProgressBar new\x0a\x09\x09parent: self;\x0a\x09\x09label: aString;\x0a\x09\x09workBlock: aBlock;\x0a\x09\x09collection: aCollection;\x0a\x09\x09yourself.\x0a\x09\x0a\x09self addProgressBar: progressBar.\x0a\x09progressBar start",
+messageSends: ["parent:", "new", "label:", "workBlock:", "collection:", "yourself", "addProgressBar:", "start"],
+referencedClasses: ["HLProgressBar"]
+}),
+smalltalk.HLProgress);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "isVisible",
+category: 'testing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@visible"];
+if(($receiver = $2) == nil || $receiver == undefined){
+$1=false;
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"isVisible",{},smalltalk.HLProgress)})},
+args: [],
+source: "isVisible\x0a\x09^ visible ifNil: [ false ]",
+messageSends: ["ifNil:"],
+referencedClasses: []
+}),
+smalltalk.HLProgress);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "progressBars",
+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["@progressBars"];
+if(($receiver = $2) == nil || $receiver == undefined){
+self["@progressBars"]=_st($OrderedCollection())._new();
+$1=self["@progressBars"];
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"progressBars",{},smalltalk.HLProgress)})},
+args: [],
+source: "progressBars\x0a\x09^ progressBars ifNil: [ progressBars := OrderedCollection new ]",
+messageSends: ["ifNil:", "new"],
+referencedClasses: ["OrderedCollection"]
+}),
+smalltalk.HLProgress);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "remove",
+category: 'actions',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(self)._isVisible();
+if(smalltalk.assert($1)){
+self["@visible"]=false;
+self["@visible"];
+smalltalk.HLModal.fn.prototype._remove.apply(_st(self), []);
+};
+return self}, function($ctx1) {$ctx1.fill(self,"remove",{},smalltalk.HLProgress)})},
+args: [],
+source: "remove\x0a\x09self isVisible ifTrue: [\x0a\x09\x09visible := false.\x0a\x09\x09super remove ]",
+messageSends: ["ifTrue:", "remove", "isVisible"],
+referencedClasses: []
+}),
+smalltalk.HLProgress);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "removeProgressBar:",
+category: 'actions',
+fn: function (aProgressBar){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._progressBars())._remove_ifAbsent_(aProgressBar,(function(){
+return smalltalk.withContext(function($ctx2) {
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+_st(_st(_st(aProgressBar)._wrapper())._asJQuery())._remove();
+_st(_st(self)._progressBars())._ifEmpty_((function(){
+return smalltalk.withContext(function($ctx2) {
+return _st(self)._remove();
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"removeProgressBar:",{aProgressBar:aProgressBar},smalltalk.HLProgress)})},
+args: ["aProgressBar"],
+source: "removeProgressBar: aProgressBar\x0a\x09self progressBars remove: aProgressBar ifAbsent: [].\x0a\x09aProgressBar wrapper asJQuery remove.\x0a\x09\x0a\x09self progressBars ifEmpty: [ self remove ]",
+messageSends: ["remove:ifAbsent:", "progressBars", "remove", "asJQuery", "wrapper", "ifEmpty:"],
+referencedClasses: []
+}),
+smalltalk.HLProgress);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renderButtonsOn:",
+category: 'rendering',
+fn: function (html){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLProgress)})},
+args: ["html"],
+source: "renderButtonsOn: html",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.HLProgress);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renderMainOn:",
+category: 'rendering',
+fn: function (html){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._progressBars())._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(html)._with_(each);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},smalltalk.HLProgress)})},
+args: ["html"],
+source: "renderMainOn: html\x0a\x09self progressBars do: [ :each |\x0a\x09\x09html with: each ]",
+messageSends: ["do:", "with:", "progressBars"],
+referencedClasses: []
+}),
+smalltalk.HLProgress);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "show",
+category: 'actions',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(self)._isVisible();
+if(! smalltalk.assert($1)){
+self["@visible"]=true;
+self["@visible"];
+_st(self)._appendToJQuery_(_st("body")._asJQuery());
+};
+return self}, function($ctx1) {$ctx1.fill(self,"show",{},smalltalk.HLProgress)})},
+args: [],
+source: "show\x0a\x09self isVisible ifFalse: [\x0a\x09\x09visible := true.\x0a\x09\x09self appendToJQuery: 'body' asJQuery ]",
+messageSends: ["ifFalse:", "appendToJQuery:", "asJQuery", "isVisible"],
+referencedClasses: []
+}),
+smalltalk.HLProgress);
+
+
+smalltalk.HLProgress.klass.iVarNames = ['default'];
+smalltalk.addMethod(
+smalltalk.method({
+selector: "default",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@default"];
+if(($receiver = $2) == nil || $receiver == undefined){
+self["@default"]=_st(self)._new();
+$1=self["@default"];
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"default",{},smalltalk.HLProgress.klass)})},
+args: [],
+source: "default\x0a\x09^ default ifNil: [ default := self new ]",
+messageSends: ["ifNil:", "new"],
+referencedClasses: []
+}),
+smalltalk.HLProgress.klass);
+
+
+smalltalk.addClass('HLProgressBar', smalltalk.HLWidget, ['label', 'parent', 'workBlock', 'collection', 'bar'], 'Helios-Core');
+smalltalk.HLProgressBar.comment="I am a widget used to display a progress bar while iterating over a collection."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "collection",
@@ -4315,13 +4532,13 @@ return smalltalk.withContext(function($ctx1) {
 var $1;
 $1=self["@collection"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"collection",{},smalltalk.HLProgress)})},
+}, function($ctx1) {$ctx1.fill(self,"collection",{},smalltalk.HLProgressBar)})},
 args: [],
 source: "collection\x0a\x09^ collection",
 messageSends: [],
 referencedClasses: []
 }),
-smalltalk.HLProgress);
+smalltalk.HLProgressBar);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -4331,13 +4548,13 @@ fn: function (aCollection){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 self["@collection"]=aCollection;
-return self}, function($ctx1) {$ctx1.fill(self,"collection:",{aCollection:aCollection},smalltalk.HLProgress)})},
+return self}, function($ctx1) {$ctx1.fill(self,"collection:",{aCollection:aCollection},smalltalk.HLProgressBar)})},
 args: ["aCollection"],
 source: "collection: aCollection\x0a\x09collection := aCollection",
 messageSends: [],
 referencedClasses: []
 }),
-smalltalk.HLProgress);
+smalltalk.HLProgressBar);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -4361,13 +4578,13 @@ return smalltalk.withContext(function($ctx2) {
 return _st(self)._remove();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithTimeout_((500));
 };
-return self}, function($ctx1) {$ctx1.fill(self,"evaluateAt:",{anInteger:anInteger},smalltalk.HLProgress)})},
+return self}, function($ctx1) {$ctx1.fill(self,"evaluateAt:",{anInteger:anInteger},smalltalk.HLProgressBar)})},
 args: ["anInteger"],
 source: "evaluateAt: anInteger\x0a\x09self updateProgress: (anInteger / self collection size) * 100.\x0a\x09self collection size > anInteger \x0a\x09\x09ifTrue: [ \x0a\x09\x09\x09[ \x0a\x09\x09\x09\x09self workBlock value: (self collection at: anInteger).\x0a\x09\x09\x09\x09self evaluateAt: anInteger + 1 ] valueWithTimeout: 10 ]\x0a\x09\x09ifFalse: [ [ self remove ] valueWithTimeout: 500 ]",
 messageSends: ["updateProgress:", "*", "/", "size", "collection", "ifTrue:ifFalse:", "valueWithTimeout:", "value:", "at:", "workBlock", "evaluateAt:", "+", "remove", ">"],
 referencedClasses: []
 }),
-smalltalk.HLProgress);
+smalltalk.HLProgressBar);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -4379,13 +4596,13 @@ return smalltalk.withContext(function($ctx1) {
 var $1;
 $1=self["@label"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLProgress)})},
+}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLProgressBar)})},
 args: [],
 source: "label\x0a\x09^ label",
 messageSends: [],
 referencedClasses: []
 }),
-smalltalk.HLProgress);
+smalltalk.HLProgressBar);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -4395,32 +4612,67 @@ fn: function (aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 self["@label"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"label:",{aString:aString},smalltalk.HLProgress)})},
+return self}, function($ctx1) {$ctx1.fill(self,"label:",{aString:aString},smalltalk.HLProgressBar)})},
 args: ["aString"],
 source: "label: aString\x0a\x09label := aString",
 messageSends: [],
 referencedClasses: []
 }),
-smalltalk.HLProgress);
+smalltalk.HLProgressBar);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "renderButtonsOn:",
-category: 'rendering',
-fn: function (html){
+selector: "parent",
+category: 'accessing',
+fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLProgress)})},
-args: ["html"],
-source: "renderButtonsOn: html",
+var $1;
+$1=self["@parent"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"parent",{},smalltalk.HLProgressBar)})},
+args: [],
+source: "parent\x0a\x09^ parent",
 messageSends: [],
 referencedClasses: []
 }),
-smalltalk.HLProgress);
+smalltalk.HLProgressBar);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "renderMainOn:",
+selector: "parent:",
+category: 'accessing',
+fn: function (aProgress){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self["@parent"]=aProgress;
+return self}, function($ctx1) {$ctx1.fill(self,"parent:",{aProgress:aProgress},smalltalk.HLProgressBar)})},
+args: ["aProgress"],
+source: "parent: aProgress\x0a\x09parent := aProgress",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.HLProgressBar);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "remove",
+category: 'actions',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._parent())._removeProgressBar_(self);
+return self}, function($ctx1) {$ctx1.fill(self,"remove",{},smalltalk.HLProgressBar)})},
+args: [],
+source: "remove\x0a\x09self parent removeProgressBar: self",
+messageSends: ["removeProgressBar:", "parent"],
+referencedClasses: []
+}),
+smalltalk.HLProgressBar);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renderContentOn:",
 category: 'rendering',
 fn: function (html){
 var self=this;
@@ -4434,16 +4686,16 @@ return smalltalk.withContext(function($ctx2) {
 $3=_st(html)._div();
 _st($3)._class_("bar");
 $4=_st($3)._style_("width: 0%");
-self["@progressBar"]=$4;
-return self["@progressBar"];
+self["@bar"]=$4;
+return self["@bar"];
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},smalltalk.HLProgress)})},
+return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLProgressBar)})},
 args: ["html"],
-source: "renderMainOn: html\x0a\x09html span with: self label.\x0a\x09html div \x0a\x09\x09class: 'progress';\x0a\x09\x09with: [\x0a\x09\x09\x09progressBar := html div \x0a\x09\x09\x09\x09class: 'bar';\x0a\x09\x09\x09\x09style: 'width: 0%' ]",
+source: "renderContentOn: html\x0a\x09html span with: self label.\x0a\x09html div \x0a\x09\x09class: 'progress';\x0a\x09\x09with: [\x0a\x09\x09\x09bar := html div \x0a\x09\x09\x09\x09class: 'bar';\x0a\x09\x09\x09\x09style: 'width: 0%' ]",
 messageSends: ["with:", "label", "span", "class:", "div", "style:"],
 referencedClasses: []
 }),
-smalltalk.HLProgress);
+smalltalk.HLProgressBar);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -4453,13 +4705,13 @@ fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 _st(self)._evaluateAt_((1));
-return self}, function($ctx1) {$ctx1.fill(self,"start",{},smalltalk.HLProgress)})},
+return self}, function($ctx1) {$ctx1.fill(self,"start",{},smalltalk.HLProgressBar)})},
 args: [],
 source: "start\x0a\x09\x22Make sure the UI has some time to update itself between each iteration\x22\x0a\x09\x0a\x09self evaluateAt: 1",
 messageSends: ["evaluateAt:"],
 referencedClasses: []
 }),
-smalltalk.HLProgress);
+smalltalk.HLProgressBar);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -4468,14 +4720,14 @@ category: 'actions',
 fn: function (anInteger){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(self["@progressBar"])._asJQuery())._css_put_("width",_st(_st(anInteger)._asString()).__comma("%"));
-return self}, function($ctx1) {$ctx1.fill(self,"updateProgress:",{anInteger:anInteger},smalltalk.HLProgress)})},
+_st(_st(self["@bar"])._asJQuery())._css_put_("width",_st(_st(anInteger)._asString()).__comma("%"));
+return self}, function($ctx1) {$ctx1.fill(self,"updateProgress:",{anInteger:anInteger},smalltalk.HLProgressBar)})},
 args: ["anInteger"],
-source: "updateProgress: anInteger\x0a\x09progressBar asJQuery css: 'width' put: anInteger asString, '%'",
+source: "updateProgress: anInteger\x0a\x09bar asJQuery css: 'width' put: anInteger asString, '%'",
 messageSends: ["css:put:", ",", "asString", "asJQuery"],
 referencedClasses: []
 }),
-smalltalk.HLProgress);
+smalltalk.HLProgressBar);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -4487,13 +4739,13 @@ return smalltalk.withContext(function($ctx1) {
 var $1;
 $1=self["@workBlock"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"workBlock",{},smalltalk.HLProgress)})},
+}, function($ctx1) {$ctx1.fill(self,"workBlock",{},smalltalk.HLProgressBar)})},
 args: [],
 source: "workBlock\x0a\x09^ workBlock",
 messageSends: [],
 referencedClasses: []
 }),
-smalltalk.HLProgress);
+smalltalk.HLProgressBar);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -4503,14 +4755,39 @@ fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 self["@workBlock"]=aBlock;
-return self}, function($ctx1) {$ctx1.fill(self,"workBlock:",{aBlock:aBlock},smalltalk.HLProgress)})},
+return self}, function($ctx1) {$ctx1.fill(self,"workBlock:",{aBlock:aBlock},smalltalk.HLProgressBar)})},
 args: ["aBlock"],
 source: "workBlock: aBlock\x0a\x09workBlock := aBlock",
 messageSends: [],
 referencedClasses: []
 }),
-smalltalk.HLProgress);
+smalltalk.HLProgressBar);
+
 
+smalltalk.HLProgressBar.klass.iVarNames = ['default'];
+smalltalk.addMethod(
+smalltalk.method({
+selector: "default",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@default"];
+if(($receiver = $2) == nil || $receiver == undefined){
+self["@default"]=_st(self)._new();
+$1=self["@default"];
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"default",{},smalltalk.HLProgressBar.klass)})},
+args: [],
+source: "default\x0a\x09^ default ifNil: [ default := self new ]",
+messageSends: ["ifNil:", "new"],
+referencedClasses: []
+}),
+smalltalk.HLProgressBar.klass);
 
 
 smalltalk.addClass('HLSUnit', smalltalk.HLWidget, [], 'Helios-Core');

+ 3 - 3
js/Kernel-Classes.deploy.js

@@ -1276,10 +1276,10 @@ return _st(exception)._signal();
 $3=self;
 _st($3)._rawRenameClass_to_(oldClass,tmp);
 $4=_st($3)._rawRenameClass_to_(newClass,className);
-_st(_st(oldClass)._subclasses())._do_((function(each){
+_st(_st(oldClass)._subclasses())._do_displayingProgress_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(self)._migrateClass_superclass_(each,newClass);
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),_st(_st("Recompiling ").__comma(_st(newClass)._name())).__comma("..."));
 _st(self)._basicRemoveClass_(oldClass);
 $5=_st($ClassMigrated())._new();
 _st($5)._theClass_(newClass);
@@ -1289,7 +1289,7 @@ _st(_st($SystemAnnouncer())._current())._announce_($6);
 $7=newClass;
 return $7;
 }, function($ctx1) {$ctx1.fill(self,"migrateClassNamed:superclass:instanceVariableNames:package:",{className:className,aClass:aClass,aCollection:aCollection,packageName:packageName,oldClass:oldClass,newClass:newClass,tmp:tmp},smalltalk.ClassBuilder)})},
-messageSends: [",", "at:", "current", "addSubclassOf:named:instanceVariableNames:package:", "basicSwapClassNames:with:", "on:do:", "basicRemoveClass:", "signal", "copyClass:to:", "rawRenameClass:to:", "do:", "migrateClass:superclass:", "subclasses", "announce:", "theClass:", "new", "oldClass:", "yourself"]}),
+messageSends: [",", "at:", "current", "addSubclassOf:named:instanceVariableNames:package:", "basicSwapClassNames:with:", "on:do:", "basicRemoveClass:", "signal", "copyClass:to:", "rawRenameClass:to:", "do:displayingProgress:", "migrateClass:superclass:", "name", "subclasses", "announce:", "theClass:", "new", "oldClass:", "yourself"]}),
 smalltalk.ClassBuilder);
 
 smalltalk.addMethod(

+ 4 - 4
js/Kernel-Classes.js

@@ -1666,10 +1666,10 @@ return _st(exception)._signal();
 $3=self;
 _st($3)._rawRenameClass_to_(oldClass,tmp);
 $4=_st($3)._rawRenameClass_to_(newClass,className);
-_st(_st(oldClass)._subclasses())._do_((function(each){
+_st(_st(oldClass)._subclasses())._do_displayingProgress_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(self)._migrateClass_superclass_(each,newClass);
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),_st(_st("Recompiling ").__comma(_st(newClass)._name())).__comma("..."));
 _st(self)._basicRemoveClass_(oldClass);
 $5=_st($ClassMigrated())._new();
 _st($5)._theClass_(newClass);
@@ -1680,8 +1680,8 @@ $7=newClass;
 return $7;
 }, function($ctx1) {$ctx1.fill(self,"migrateClassNamed:superclass:instanceVariableNames:package:",{className:className,aClass:aClass,aCollection:aCollection,packageName:packageName,oldClass:oldClass,newClass:newClass,tmp:tmp},smalltalk.ClassBuilder)})},
 args: ["className", "aClass", "aCollection", "packageName"],
-source: "migrateClassNamed: className superclass: aClass instanceVariableNames: aCollection package: packageName\x0a\x09| oldClass newClass tmp |\x0a\x09\x0a\x09tmp := 'new*', className.\x0a\x09oldClass := Smalltalk current at: className.\x0a\x09\x0a\x09newClass := self\x0a\x09\x09addSubclassOf: aClass\x0a\x09\x09named: tmp\x0a\x09\x09instanceVariableNames: aCollection\x0a\x09\x09package: packageName.\x0a\x0a\x09self basicSwapClassNames: oldClass with: newClass.\x0a\x0a\x09[ self copyClass: oldClass to: newClass ]\x0a\x09\x09on: Error\x0a\x09\x09do: [ :exception |\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09basicSwapClassNames: oldClass with: newClass;\x0a\x09\x09\x09\x09basicRemoveClass: newClass.\x0a\x09\x09\x09exception signal ].\x0a\x0a\x09self\x0a\x09\x09rawRenameClass: oldClass to: tmp;\x0a\x09\x09rawRenameClass: newClass to: className.\x0a\x0a\x09oldClass subclasses do: [ :each |\x0a\x09\x09self migrateClass: each superclass: newClass ].\x0a\x0a\x09self basicRemoveClass: oldClass.\x0a\x09\x0a\x09SystemAnnouncer current announce: (ClassMigrated new\x0a\x09\x09theClass: newClass;\x0a\x09\x09oldClass: oldClass;\x0a\x09\x09yourself).\x0a\x09\x0a\x09^newClass",
-messageSends: [",", "at:", "current", "addSubclassOf:named:instanceVariableNames:package:", "basicSwapClassNames:with:", "on:do:", "basicRemoveClass:", "signal", "copyClass:to:", "rawRenameClass:to:", "do:", "migrateClass:superclass:", "subclasses", "announce:", "theClass:", "new", "oldClass:", "yourself"],
+source: "migrateClassNamed: className superclass: aClass instanceVariableNames: aCollection package: packageName\x0a\x09| oldClass newClass tmp |\x0a\x09\x0a\x09tmp := 'new*', className.\x0a\x09oldClass := Smalltalk current at: className.\x0a\x09\x0a\x09newClass := self\x0a\x09\x09addSubclassOf: aClass\x0a\x09\x09named: tmp\x0a\x09\x09instanceVariableNames: aCollection\x0a\x09\x09package: packageName.\x0a\x0a\x09self basicSwapClassNames: oldClass with: newClass.\x0a\x0a\x09[ self copyClass: oldClass to: newClass ]\x0a\x09\x09on: Error\x0a\x09\x09do: [ :exception |\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09basicSwapClassNames: oldClass with: newClass;\x0a\x09\x09\x09\x09basicRemoveClass: newClass.\x0a\x09\x09\x09exception signal ].\x0a\x0a\x09self\x0a\x09\x09rawRenameClass: oldClass to: tmp;\x0a\x09\x09rawRenameClass: newClass to: className.\x0a\x0a\x09oldClass subclasses \x0a\x09\x09do: [ :each | self migrateClass: each superclass: newClass ]\x0a\x09\x09displayingProgress: 'Recompiling ', newClass name, '...'.\x0a\x0a\x09self basicRemoveClass: oldClass.\x0a\x09\x0a\x09SystemAnnouncer current announce: (ClassMigrated new\x0a\x09\x09theClass: newClass;\x0a\x09\x09oldClass: oldClass;\x0a\x09\x09yourself).\x0a\x09\x0a\x09^newClass",
+messageSends: [",", "at:", "current", "addSubclassOf:named:instanceVariableNames:package:", "basicSwapClassNames:with:", "on:do:", "basicRemoveClass:", "signal", "copyClass:to:", "rawRenameClass:to:", "do:displayingProgress:", "migrateClass:superclass:", "name", "subclasses", "announce:", "theClass:", "new", "oldClass:", "yourself"],
 referencedClasses: ["Smalltalk", "Error", "ClassMigrated", "SystemAnnouncer"]
 }),
 smalltalk.ClassBuilder);