@@ -38,15 +38,15 @@ import scalafx.beans.property.{ReadOnlyBooleanProperty, ReadOnlyBooleanWrapper,
3838 */
3939class ScalaConsolePaneModel extends ModelFX {
4040
41- val statusText = new StringProperty ( " Welcome to Scala Console " )
42- val editor = new Editor ( )
43- val outputArea = new OutputArea ()
41+ private val listCodeOnRun : Boolean = false
42+ private val _isReady = new ReadOnlyBooleanWrapper ( this , " isReady " , true )
43+ private val scalaInterpreter = new ScalaInterpreter ()
4444
45- private val _isReady = new ReadOnlyBooleanWrapper (this , " isReady" , true )
45+ val statusText = new StringProperty (" Welcome to Scala Console" )
46+ val editor = new Editor ()
47+ val outputArea = new OutputArea ()
4648 val isReady : ReadOnlyBooleanProperty = _isReady.readOnlyProperty
4749
48- private val scalaInterpreter = new ScalaInterpreter ()
49-
5050 private val interpreterReactions =
5151 new Subscriber [InterpreterEvent , Publisher [InterpreterEvent ]] {
5252 override def notify (pub : Publisher [InterpreterEvent ], event : InterpreterEvent ): Unit = {
@@ -89,7 +89,7 @@ class ScalaConsolePaneModel extends ModelFX {
8989 val code = if (selection != null && selection.nonEmpty) selection else editor.text
9090
9191 // Show which code will be run
92- outputArea.model.list(code)
92+ if (listCodeOnRun) outputArea.model.list(code)
9393
9494 // Run the code
9595 scalaInterpreter.run(code)
0 commit comments