ソースを参照

AmberCli: recategorize methods

Manfred Kroehnert 10 年 前
コミット
f1300102ba
2 ファイル変更15 行追加15 行削除
  1. 2 2
      cli/js/AmberCli.js
  2. 13 13
      cli/st/AmberCli.st

+ 2 - 2
cli/js/AmberCli.js

@@ -1189,7 +1189,7 @@ smalltalk.Repl);
 smalltalk.addMethod(
 smalltalk.method({
 selector: "clearScreen",
-category: 'private',
+category: 'actions',
 fn: function (){
 var self=this;
 var esc,cls;
@@ -1558,7 +1558,7 @@ smalltalk.Repl);
 smalltalk.addMethod(
 smalltalk.method({
 selector: "printWelcome",
-category: 'private',
+category: 'actions',
 fn: function (){
 var self=this;
 function $Transcript(){return smalltalk.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}

+ 13 - 13
cli/st/AmberCli.st

@@ -913,6 +913,14 @@ prompt
 
 !Repl methodsFor: 'actions'!
 
+clearScreen
+	| esc cls |
+	esc := String fromCharCode: 27.
+	cls := esc, '[2J', esc, '[0;0f'.
+	process stdout write: cls.
+	interface prompt
+!
+
 close
 	process stdin destroy
 !
@@ -941,6 +949,11 @@ eval: buffer on: anObject
 	^ result
 !
 
+printWelcome
+	Transcript show: 'Welcome to Amber version ', Smalltalk current version, ' (NodeJS ', process versions node, ').'.
+	Transcript show: 'Type :q to exit.'; cr.
+!
+
 setPrompt
 	interface setPrompt: self prompt
 ! !
@@ -987,14 +1000,6 @@ assignNewVariable: buffer do: aBlock
 		aBlock value: varName value: value]
 !
 
-clearScreen
-	| esc cls |
-	esc := String fromCharCode: 27.
-	cls := esc, '[2J', esc, '[0;0f'.
-	process stdout write: cls.
-	interface prompt
-!
-
 encapsulateVariable: aString withValue: anObject in: aClass
 	"Add getter and setter for given variable to session."
 	| compiler |
@@ -1056,11 +1061,6 @@ presentResultNamed: varName withValue: value
 	interface prompt
 !
 
-printWelcome
-	Transcript show: 'Welcome to Amber version ', Smalltalk current version, ' (NodeJS ', process versions node, ').'.
-	Transcript show: 'Type :q to exit.'; cr.
-!
-
 processLine: buffer
 	"Processes lines entered through the readline interface."
 	| show |