Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit e322de6

Browse files
committed
Deleted the REPL.
1 parent 0bed3ba commit e322de6

File tree

4 files changed

+4
-188
lines changed

4 files changed

+4
-188
lines changed

src/main/scala/org/codeoverflow/chatoverflow/Launcher.scala

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package org.codeoverflow.chatoverflow
22

3-
import org.codeoverflow.chatoverflow.ui.CLI.{UI, parse}
4-
import org.codeoverflow.chatoverflow.ui.repl.REPL
3+
import org.codeoverflow.chatoverflow.ui.CLI.parse
54
import org.codeoverflow.chatoverflow.ui.web.Server
65

76
/**
@@ -35,6 +34,9 @@ object Launcher extends WithLogger {
3534
chatOverflow.load()
3635
}
3736

37+
// Launch server (UI backend)
38+
startServer(chatOverflow, config.webServerPort)
39+
3840
// Start plugins if specified
3941
if (chatOverflow.isLoaded && config.startupPlugins.nonEmpty) {
4042
for (instanceName <- config.startupPlugins) {
@@ -47,17 +49,6 @@ object Launcher extends WithLogger {
4749
}
4850
}
4951
}
50-
51-
// Launch UI
52-
config.ui match {
53-
case UI.GUI =>
54-
startServer(chatOverflow, config.webServerPort)
55-
case UI.REPL =>
56-
startREPL(chatOverflow)
57-
case UI.BOTH =>
58-
startServer(chatOverflow, config.webServerPort)
59-
startREPL(chatOverflow)
60-
}
6152
}
6253
}
6354

@@ -68,10 +59,6 @@ object Launcher extends WithLogger {
6859
}
6960
}
7061

71-
private def startREPL(chatOverflow: ChatOverflow): Unit = {
72-
new REPL(chatOverflow).run()
73-
}
74-
7562
/**
7663
* Shuts down the framework.
7764
*/

src/main/scala/org/codeoverflow/chatoverflow/ui/CLI.scala

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,18 @@
11
package org.codeoverflow.chatoverflow.ui
22

33
import org.codeoverflow.chatoverflow.api.APIVersion
4-
import org.codeoverflow.chatoverflow.ui.CLI.UI.UI
54

65
/**
76
* The command line interface provides all methods needed to configure the framework and run plugins.
87
*/
98
object CLI {
10-
val modeAddInstance = "addInstance"
11-
12-
implicit val UIRead: scopt.Read[UI.Value] =
13-
scopt.Read.reads(UI withName)
149

1510
/**
1611
* Creating a big parser with all inputs and commands using the SCOPT framework.
1712
*/
1813
private val argsParser = new scopt.OptionParser[Config]("Chat Overflow") {
1914
head(s"Chat Overflow ${APIVersion.MAJOR_VERSION}.${APIVersion.MINOR_VERSION}")
2015

21-
opt[UI]('u', "userInterface").action((x, c) =>
22-
c.copy(ui = x)).text(s"select the ui to launch after initialization. Possible values are: ${UI.values.mkString(", ")}.")
23-
2416
opt[String]('p', "pluginFolder").action((x, c) =>
2517
c.copy(pluginFolderPath = x)).text("path to a folder with packaged plugin jar files")
2618

@@ -75,18 +67,12 @@ object CLI {
7567
case class Config(pluginFolderPath: String = "plugins/",
7668
configFolderPath: String = "config/",
7769
requirementPackage: String = "org.codeoverflow.chatoverflow.requirement",
78-
ui: UI = UI.GUI,
7970
requirePasswordOnStartup: Boolean = true,
8071
pluginDataPath: String = "data",
8172
webServerPort: Int = 2400,
8273
pluginLogOutputOnConsole: Boolean = true,
8374
loginPassword: Array[Char] = Array[Char](),
8475
startupPlugins: Seq[String] = Seq[String]())
8576

86-
object UI extends Enumeration {
87-
type UI = Value
88-
val GUI, REPL, BOTH = Value
89-
}
90-
9177
}
9278

src/main/scala/org/codeoverflow/chatoverflow/ui/repl/REPL.scala

Lines changed: 0 additions & 147 deletions
This file was deleted.

src/main/scala/org/codeoverflow/chatoverflow/ui/repl/REPLCommand.scala

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)