File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/main/java/org/scijava/batch Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 5
5
6
6
import org .scijava .Priority ;
7
7
import org .scijava .command .CommandService ;
8
+ import org .scijava .log .LogService ;
8
9
import org .scijava .module .ModuleInfo ;
9
10
import org .scijava .plugin .Parameter ;
10
11
import org .scijava .plugin .Plugin ;
15
16
public final class FileBatchService extends AbstractService implements
16
17
BatchService {
17
18
19
+ @ Parameter
20
+ private LogService log ;
21
+
18
22
@ Parameter
19
23
private CommandService commandService ;
20
24
@@ -28,6 +32,11 @@ public boolean supports(Class<?> type) {
28
32
29
33
@ Override
30
34
public void run (ModuleInfo moduleInfo ) {
35
+ // check if moduleInfo has batchable inputs
36
+ if (batchableInputs (moduleInfo ).isEmpty ()) {
37
+ log .error ("No compatible inputs (of type File) found." );
38
+ return ;
39
+ }
31
40
// Call ModuleBatchProcessor with input moduleInfo
32
41
HashMap <String , Object > inputMap = new HashMap <>();
33
42
inputMap .put ("moduleInfo" , moduleInfo );
You can’t perform that action at this time.
0 commit comments