@@ -21,8 +21,7 @@ object PluginLanguage extends Enumeration {
21
21
*/
22
22
def getSourceFileContent (name : String , lang : PluginLanguage .Value ): String = lang match {
23
23
case JAVA =>
24
- s """
25
- |import org.codeoverflow.chatoverflow.api.io.input.SampleInput;
24
+ s """ import org.codeoverflow.chatoverflow.api.io.input.SampleInput;
26
25
|import org.codeoverflow.chatoverflow.api.plugin.PluginImpl;
27
26
|import org.codeoverflow.chatoverflow.api.plugin.PluginManager;
28
27
|import org.codeoverflow.chatoverflow.api.plugin.configuration.Requirement;
@@ -34,7 +33,7 @@ object PluginLanguage extends Enumeration {
34
33
| }
35
34
|
36
35
| // 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);
38
37
|
39
38
| /**
40
39
| * 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 {
44
43
| // you can adjust the loop interval here
45
44
| // loopInterval = 1000;
46
45
|
47
- | log("Initialized $name plugin !");
46
+ | log("Initialized $name!");
48
47
| }
49
48
|
50
49
| /**
@@ -53,27 +52,26 @@ object PluginLanguage extends Enumeration {
53
52
| */
54
53
| @Override
55
54
| public void loop() {
56
- | log(" $name plugin loop!");
55
+ | log(" $name loop!");
57
56
| }
58
57
|
59
58
| /**
60
59
| * The shutdown method should contain logic to close everything.
61
60
| */
62
61
| @Override
63
62
| public void shutdown() {
64
- | log("Shutting down $name plugin !");
63
+ | log("Shutting down $name!");
65
64
| }
66
65
|}
67
66
|
68
67
""" .stripMargin
69
68
case SCALA =>
70
- s """
71
- |import org.codeoverflow.chatoverflow.api.plugin.{PluginImpl, PluginManager}
69
+ s """ import org.codeoverflow.chatoverflow.api.plugin.{PluginImpl, PluginManager}
72
70
|
73
71
|class ${name}Plugin(manager: PluginManager) extends PluginImpl(manager) {
74
72
|
75
73
| // 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)
77
75
|
78
76
| // you can adjust the loop interval here
79
77
| // loopInterval = 1000;
@@ -82,22 +80,22 @@ object PluginLanguage extends Enumeration {
82
80
| * The setup method is executed one, when the plugin is started. Do NOT define your requirements in here!
83
81
| */
84
82
| override def setup(): Unit = {
85
- | log("Initialized $name plugin !")
83
+ | log("Initialized $name!")
86
84
| }
87
85
|
88
86
| /**
89
87
| * The loop method is executed in loop with a specified interval until the shutdown method is called.
90
88
| * The loop method is NOT executed if a negative loop interval is set.
91
89
| */
92
90
| override def loop(): Unit = {
93
- | log(" $name plugin loop!")
91
+ | log(" $name loop!")
94
92
| }
95
93
|
96
94
| /**
97
95
| * The shutdown method should contain logic to close everything.
98
96
| */
99
97
| override def shutdown(): Unit = {
100
- | log("Shutting down $name plugin !")
98
+ | log("Shutting down $name!")
101
99
| }
102
100
|}
103
101
|
0 commit comments