Skip to content

Commit 14c035c

Browse files
committed
Remove the JavaService in favor of the RunService
The core logic of JavaService was generalized and moved to SciJava Common in the form of the org.scijava.run package and friends. See: scijava/scijava-common#226
1 parent 6855b61 commit 14c035c

File tree

9 files changed

+7
-420
lines changed

9 files changed

+7
-420
lines changed

pom.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.scijava</groupId>
77
<artifactId>pom-scijava</artifactId>
8-
<version>10.0.1</version>
8+
<version>10.1.0</version>
99
<relativePath />
1010
</parent>
1111

@@ -140,5 +140,4 @@ Institute of Molecular Cell Biology and Genetics.</organizationName>
140140
</plugin>
141141
</plugins>
142142
</build>
143-
144143
</project>

src/main/java/org/scijava/plugins/scripting/java/AbstractJavaRunner.java

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

src/main/java/org/scijava/plugins/scripting/java/CommandJavaRunner.java

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

src/main/java/org/scijava/plugins/scripting/java/DefaultJavaService.java

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

src/main/java/org/scijava/plugins/scripting/java/JavaEngine.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
import org.scijava.minimaven.MavenProject;
7474
import org.scijava.plugin.Parameter;
7575
import org.scijava.plugin.PluginService;
76+
import org.scijava.run.RunService;
7677
import org.scijava.script.AbstractScriptEngine;
7778
import org.scijava.util.FileUtils;
7879
import org.scijava.util.LineOutputStream;
@@ -114,14 +115,14 @@ public class JavaEngine extends AbstractScriptEngine {
114115
private CommandService commandService;
115116

116117
@Parameter
117-
private JavaService javaService;
118+
private RunService runService;
118119

119120
/**
120121
* Compiles and runs the specified {@code .java} class. If a filename is set
121122
* in the engine scope bindings via the {@link ScriptEngine#FILENAME} key,
122123
* this method compiles that file and runs the resulting main class instead.
123124
* <p>
124-
* The currently active {@link JavaService} is responsible for running the
125+
* The currently active {@link RunService} is responsible for running the
125126
* class.
126127
* </p>
127128
*
@@ -133,7 +134,7 @@ public Object eval(String script) throws ScriptException {
133134
final Writer writer = getContext().getErrorWriter();
134135
try {
135136
final Class<?> clazz = compile(script);
136-
javaService.run(clazz);
137+
runService.run(clazz);
137138
}
138139
catch (Exception e) {
139140
if (writer != null) {

src/main/java/org/scijava/plugins/scripting/java/JavaRunner.java

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

src/main/java/org/scijava/plugins/scripting/java/JavaService.java

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

0 commit comments

Comments
 (0)