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

Commit 68e0ec8

Browse files
committed
Update templates for generated getting started files to new requirement names
1 parent 9a509d7 commit 68e0ec8

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

project/PluginLanguage.scala

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ object PluginLanguage extends Enumeration {
2121
*/
2222
def getSourceFileContent(name: String, lang: PluginLanguage.Value): String = lang match {
2323
case JAVA =>
24-
s"""
25-
|import org.codeoverflow.chatoverflow.api.io.input.SampleInput;
24+
s"""import org.codeoverflow.chatoverflow.api.io.input.SampleInput;
2625
|import org.codeoverflow.chatoverflow.api.plugin.PluginImpl;
2726
|import org.codeoverflow.chatoverflow.api.plugin.PluginManager;
2827
|import org.codeoverflow.chatoverflow.api.plugin.configuration.Requirement;
@@ -34,7 +33,7 @@ object PluginLanguage extends Enumeration {
3433
| }
3534
|
3635
| // require more requirements as needed here
37-
| private Requirement<SampleInput> sampleReq = require.input.sampleInput("sampleReq", "Sample requirement", true);
36+
| private Requirement<SampleInput> sampleReq = require.input.sample("sampleReq", "Sample requirement", true);
3837
|
3938
| /**
4039
| * The setup method is executed one, when the plugin is started. Do NOT define your requirements in here!
@@ -44,7 +43,7 @@ object PluginLanguage extends Enumeration {
4443
| // you can adjust the loop interval here
4544
| // loopInterval = 1000;
4645
|
47-
| log("Initialized $name plugin!");
46+
| log("Initialized $name!");
4847
| }
4948
|
5049
| /**
@@ -53,27 +52,26 @@ object PluginLanguage extends Enumeration {
5352
| */
5453
| @Override
5554
| public void loop() {
56-
| log("$name plugin loop!");
55+
| log("$name loop!");
5756
| }
5857
|
5958
| /**
6059
| * The shutdown method should contain logic to close everything.
6160
| */
6261
| @Override
6362
| public void shutdown() {
64-
| log("Shutting down $name plugin!");
63+
| log("Shutting down $name!");
6564
| }
6665
|}
6766
|
6867
""".stripMargin
6968
case SCALA =>
70-
s"""
71-
|import org.codeoverflow.chatoverflow.api.plugin.{PluginImpl, PluginManager}
69+
s"""import org.codeoverflow.chatoverflow.api.plugin.{PluginImpl, PluginManager}
7270
|
7371
|class ${name}Plugin(manager: PluginManager) extends PluginImpl(manager) {
7472
|
7573
| // require more requirements as needed here
76-
| private val sampleReq = require.input.sampleInput("sampleReq", "Sample requirement", true)
74+
| private val sampleReq = require.input.sample("sampleReq", "Sample requirement", true)
7775
|
7876
| // you can adjust the loop interval here
7977
| // loopInterval = 1000;
@@ -82,22 +80,22 @@ object PluginLanguage extends Enumeration {
8280
| * The setup method is executed one, when the plugin is started. Do NOT define your requirements in here!
8381
| */
8482
| override def setup(): Unit = {
85-
| log("Initialized $name plugin!")
83+
| log("Initialized $name!")
8684
| }
8785
|
8886
| /**
8987
| * The loop method is executed in loop with a specified interval until the shutdown method is called.
9088
| * The loop method is NOT executed if a negative loop interval is set.
9189
| */
9290
| override def loop(): Unit = {
93-
| log("$name plugin loop!")
91+
| log("$name loop!")
9492
| }
9593
|
9694
| /**
9795
| * The shutdown method should contain logic to close everything.
9896
| */
9997
| override def shutdown(): Unit = {
100-
| log("Shutting down $name plugin!")
98+
| log("Shutting down $name!")
10199
| }
102100
|}
103101
|

0 commit comments

Comments
 (0)