Sfoglia il codice sorgente

Merge branch 'master' into amber-config-used

Conflicts:
	support/amber.js
	support/helios/set.js
Herbert Vojčík 10 anni fa
parent
commit
dc5ac4573f
11 ha cambiato i file con 148 aggiunte e 45 eliminazioni
  1. 0 35
      all.js
  2. 1 1
      index.html
  3. 1 1
      resources/helios.css
  4. 1 1
      resources/helios.less
  5. 10 0
      resources/set-inner.js
  6. 17 0
      set.js
  7. 4 2
      src/Helios-References.js
  8. 1 0
      src/Helios-References.st
  9. 63 4
      src/Helios-SUnit.js
  10. 29 1
      src/Helios-SUnit.st
  11. 21 0
      src/all.js

+ 0 - 35
all.js

@@ -1,35 +0,0 @@
-define([
-	'amber/helpers', // pre-fetch, dep of amber/deploy
-	'amber/deploy', // pre-fetch, dep of amber/lang
-	'amber/lang',
-	'amber/codemirror',
-    'jquery-ui',
-    'amber_lib/jquery-tabby/jquery.textarea',
-    'amber_core/IDE',
-    'amber_core/Examples',
-    'amber_core/Benchfib',
-    'bootstrap2.3.2/js/bootstrap',
-    'amber_lib/showdown/compressed/showdown',
-    './Helios-Core',
-    './Helios-Exceptions',
-    './Helios-Helpers',
-    './Helios-Commands-Core',
-    './Helios-Commands-Tools',
-    './Helios-Commands-Browser',
-    './Helios-Commands-SUnit',
-    './Helios-Layout',
-    './Helios-KeyBindings',
-    './Helios-Browser',
-    './Helios-Workspace',
-    './Helios-Transcript',
-    './Helios-SUnit',
-    './Helios-SUnit-Tests',
-    './Helios-Debugger',
-    './Helios-Inspector',
-    './Helios-References',
-    './Helios-Announcements',
-    './Helios-Workspace-Tests',
-    'css!./resources/helios',
-	'css!./resources/helios-niflheim',
-    'css!./resources/niflheim'
-], function (smalltalk) { return smalltalk; });

+ 1 - 1
index.html

@@ -15,7 +15,7 @@
         <script type='text/javascript'>
           require.config({baseUrl: '../..'});
           require(
-                  ["helios/all"],
+                  ["helios/set"],
                   function (smalltalk) {
                       window.onbeforeunload = function() {
                           return 'Do you want to close Amber? All uncommitted changes will be lost.';

+ 1 - 1
resources/helios.css

@@ -452,7 +452,7 @@ body[id="helios"] .tool_container .pane .nav-pills i.package {
   background-image: url('package.png');
 }
 body[id="helios"] .tool_container .pane .nav-pills i.override {
-  background-image: url('resources/override.png ');
+  background-image: url('override.png ');
 }
 body[id="helios"] .tool_container .pane .nav-pills i.overridden {
   background-image: url('overridden.png');

+ 1 - 1
resources/helios.less

@@ -531,7 +531,7 @@ body[id="helios"] {
 		background-image: url('package.png');
 	}
 	.tool_container .pane .nav-pills i.override {
-		background-image: url('resources/override.png ');
+		background-image: url('override.png ');
 	}
 	.tool_container .pane .nav-pills i.overridden {
 		background-image: url('overridden.png');

+ 10 - 0
resources/set-inner.js

@@ -0,0 +1,10 @@
+// Loading this in nested file so that require.config
+// with shim dependencies is in effect.
+// See http://stackoverflow.com/questions/21647956/how-to-config-requirejs-shim-dependencies-just-in-time/
+
+define([
+	'amber/devel-inner',
+	'bootstrap2.3.2/js/bootstrap',
+	'amber_lib/showdown/compressed/showdown',
+    'helios/all'
+]);

+ 17 - 0
set.js

@@ -0,0 +1,17 @@
+define([
+	'amber/helpers', // pre-fetch, dep of amber/deploy
+	'amber/deploy', // pre-fetch, dep of amber/lang
+	'amber/lang',
+	'amber/codemirror',
+    'jquery-ui',
+    'amber_lib/jquery-tabby/jquery.textarea',
+    'amber_core/IDE',
+    'amber_core/Examples',
+    'amber_core/Benchfib',
+    'bootstrap2.3.2/js/bootstrap',
+    'amber_lib/showdown/compressed/showdown',
+    './all',
+    'css!./resources/helios',
+	'css!./resources/helios-niflheim',
+    'css!./resources/niflheim'
+], function (smalltalk) { return smalltalk; });

+ 4 - 2
src/Helios-References.js

@@ -606,11 +606,13 @@ protocol: 'actions',
 fn: function (aMethod){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+($ctx1.supercall = true, globals.HLReferencesListWidget.superclass.fn.prototype._selectItem_.apply(_st(self), [aMethod]));
+$ctx1.supercall = false;
 _st(self._model())._selectedMethod_(aMethod);
 return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aMethod:aMethod},globals.HLReferencesListWidget)})},
 args: ["aMethod"],
-source: "selectItem: aMethod\x0a\x09self model selectedMethod: aMethod",
-messageSends: ["selectedMethod:", "model"],
+source: "selectItem: aMethod\x0a\x09super selectItem: aMethod.\x0a\x09self model selectedMethod: aMethod",
+messageSends: ["selectItem:", "selectedMethod:", "model"],
 referencedClasses: []
 }),
 globals.HLReferencesListWidget);

+ 1 - 0
src/Helios-References.st

@@ -171,6 +171,7 @@ observeModel
 !
 
 selectItem: aMethod
+	super selectItem: aMethod.
 	self model selectedMethod: aMethod
 ! !
 

+ 63 - 4
src/Helios-SUnit.js

@@ -440,15 +440,14 @@ var $1,$2;
 $1=_st(html)._button();
 _st($1)._class_("button");
 _st($1)._with_("Select all");
-$ctx1.sendIdx["with:"]=1;
-$2=_st($1)._with_((function(){
+$2=_st($1)._onClick_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(self._model())._selectAllClasses();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.HLSUnitClassesListWidget)})},
 args: ["html"],
-source: "renderButtonsOn: html\x0a\x09html button\x0a\x09\x09class: 'button'; \x0a\x09\x09with: 'Select all';\x0a\x09\x09with: [ self model selectAllClasses ]",
-messageSends: ["class:", "button", "with:", "selectAllClasses", "model"],
+source: "renderButtonsOn: html\x0a\x09html button\x0a\x09\x09class: 'button'; \x0a\x09\x09with: 'Select all';\x0a\x09\x09onClick: [ self model selectAllClasses ]",
+messageSends: ["class:", "button", "with:", "onClick:", "selectAllClasses", "model"],
 referencedClasses: []
 }),
 globals.HLSUnitClassesListWidget);
@@ -1045,6 +1044,28 @@ referencedClasses: ["HLSUnitResults"]
 }),
 globals.HLSUnit);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "unregister",
+protocol: 'actions',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+($ctx1.supercall = true, globals.HLSUnit.superclass.fn.prototype._unregister.apply(_st(self), []));
+$ctx1.supercall = false;
+$ctx1.sendIdx["unregister"]=1;
+_st([self._packagesListWidget(),self._classesListWidget(),self._resultWidget(),self._errorsWidget(),self._failuresWidget()])._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(each)._unregister();
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},globals.HLSUnit)})},
+args: [],
+source: "unregister\x0a\x09super unregister.\x0a\x0a\x09{ \x0a\x09\x09self packagesListWidget.\x0a\x09\x09self classesListWidget.\x0a\x09\x09self resultWidget.\x0a\x09\x09self errorsWidget.\x0a\x09\x09self failuresWidget\x0a\x09} \x0a\x09\x09do: [ :each | each unregister ]",
+messageSends: ["unregister", "do:", "packagesListWidget", "classesListWidget", "resultWidget", "errorsWidget", "failuresWidget"],
+referencedClasses: []
+}),
+globals.HLSUnit);
+
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -1939,6 +1960,24 @@ referencedClasses: []
 }),
 globals.HLSUnitResultStatus);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "unregister",
+protocol: 'actions',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+($ctx1.supercall = true, globals.HLSUnitResultStatus.superclass.fn.prototype._unregister.apply(_st(self), []));
+$ctx1.supercall = false;
+_st(_st(self._model())._announcer())._unsubscribe_(self);
+return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},globals.HLSUnitResultStatus)})},
+args: [],
+source: "unregister\x0a\x09super unregister.\x0a\x09self model announcer unsubscribe: self.",
+messageSends: ["unregister", "unsubscribe:", "announcer", "model"],
+referencedClasses: []
+}),
+globals.HLSUnitResultStatus);
+
 
 
 smalltalk.addClass('HLSUnitResults', globals.HLWidget, ['model', 'progressBarWidget', 'resultStatusWidget'], 'Helios-SUnit');
@@ -2122,5 +2161,25 @@ referencedClasses: ["HLSUnitResultStatus"]
 }),
 globals.HLSUnitResults);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "unregister",
+protocol: 'actions',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+($ctx1.supercall = true, globals.HLSUnitResults.superclass.fn.prototype._unregister.apply(_st(self), []));
+$ctx1.supercall = false;
+$ctx1.sendIdx["unregister"]=1;
+_st(_st(self._model())._announcer())._unsubscribe_(self);
+_st(self._resultStatusWidget())._unregister();
+return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},globals.HLSUnitResults)})},
+args: [],
+source: "unregister\x0a\x09super unregister.\x0a\x09self model announcer unsubscribe: self.\x0a\x09self resultStatusWidget unregister.",
+messageSends: ["unregister", "unsubscribe:", "announcer", "model", "resultStatusWidget"],
+referencedClasses: []
+}),
+globals.HLSUnitResults);
+
 
 });

+ 29 - 1
src/Helios-SUnit.st

@@ -163,7 +163,7 @@ renderButtonsOn: html
 	html button
 		class: 'button'; 
 		with: 'Select all';
-		with: [ self model selectAllClasses ]
+		onClick: [ self model selectAllClasses ]
 !
 
 renderItemLabel: aClass on: html
@@ -304,6 +304,21 @@ resultSection
 			with: self errorsWidget)
 ! !
 
+!HLSUnit methodsFor: 'actions'!
+
+unregister
+	super unregister.
+
+	{ 
+		self packagesListWidget.
+		self classesListWidget.
+		self resultWidget.
+		self errorsWidget.
+		self failuresWidget
+	} 
+		do: [ :each | each unregister ]
+! !
+
 !HLSUnit methodsFor: 'keybindings'!
 
 registerBindingsOn: aBindingGroup
@@ -617,6 +632,11 @@ observeModel
 		on: ResultAnnouncement
 		send: #onResultAnnouncement:
 		to: self
+!
+
+unregister
+	super unregister.
+	self model announcer unsubscribe: self.
 ! !
 
 !HLSUnitResultStatus methodsFor: 'printing'!
@@ -685,6 +705,14 @@ resultStatusWidget
 		yourself]
 ! !
 
+!HLSUnitResults methodsFor: 'actions'!
+
+unregister
+	super unregister.
+	self model announcer unsubscribe: self.
+	self resultStatusWidget unregister.
+! !
+
 !HLSUnitResults methodsFor: 'initialization'!
 
 observeModel

+ 21 - 0
src/all.js

@@ -0,0 +1,21 @@
+define([
+	'./Helios-Core',
+	'./Helios-Exceptions',
+	'./Helios-Helpers',
+	'./Helios-Commands-Core',
+	'./Helios-Commands-Tools',
+	'./Helios-Commands-Browser',
+	'./Helios-Commands-SUnit',
+	'./Helios-Layout',
+	'./Helios-KeyBindings',
+	'./Helios-Browser',
+	'./Helios-Workspace',
+	'./Helios-Transcript',
+	'./Helios-SUnit',
+	'./Helios-SUnit-Tests',
+	'./Helios-Debugger',
+	'./Helios-Inspector',
+	'./Helios-References',
+	'./Helios-Announcements',
+	'./Helios-Workspace-Tests'
+]);