Browse Source

Adds AMDPackageTransport >> printOn: with the namespace

Nicolas Petton 11 years ago
parent
commit
facc4e7bce
2 changed files with 33 additions and 0 deletions
  1. 23 0
      js/Importer-Exporter.js
  2. 10 0
      st/Importer-Exporter.st

+ 23 - 0
js/Importer-Exporter.js

@@ -2229,6 +2229,29 @@ referencedClasses: []
 }),
 smalltalk.AmdPackageTransport);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "printOn:",
+category: 'printing',
+fn: function (aStream){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+smalltalk.AmdPackageTransport.superclass.fn.prototype._printOn_.apply(_st(self), [aStream]);
+$1=aStream;
+_st($1)._nextPutAll_(" (AMD Namespace: ");
+$ctx1.sendIdx["nextPutAll:"]=1;
+_st($1)._nextPutAll_(self._namespace());
+$ctx1.sendIdx["nextPutAll:"]=2;
+$2=_st($1)._nextPutAll_(")");
+return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.AmdPackageTransport)})},
+args: ["aStream"],
+source: "printOn: aStream\x0a\x09super printOn: aStream.\x0a\x09aStream\x0a\x09\x09nextPutAll: ' (AMD Namespace: ';\x0a\x09\x09nextPutAll: self namespace;\x0a\x09\x09nextPutAll: ')'",
+messageSends: ["printOn:", "nextPutAll:", "namespace"],
+referencedClasses: []
+}),
+smalltalk.AmdPackageTransport);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "setupFromJson:",

+ 10 - 0
st/Importer-Exporter.st

@@ -791,6 +791,16 @@ setupFromJson: anObject
 	self namespace: (anObject at: 'amdNamespace')
 ! !
 
+!AmdPackageTransport methodsFor: 'printing'!
+
+printOn: aStream
+	super printOn: aStream.
+	aStream
+		nextPutAll: ' (AMD Namespace: ';
+		nextPutAll: self namespace;
+		nextPutAll: ')'
+! !
+
 !AmdPackageTransport class methodsFor: 'accessing'!
 
 type