Skip to content

Commit 97edb92

Browse files
authored
Update MacroPreprocessor.java
1 parent 44fd436 commit 97edb92

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/main/java/net/imagej/legacy/plugin/MacroPreprocessor.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,17 @@ public void process(final Module module) {
6666
if (ij1Helper == null) return;
6767
if (!ij1Helper.isMacro()) return;
6868
for (final ModuleItem<?> input : module.getInfo().inputs()) {
69-
final Class<?> type = input.getType();
7069
final String name = input.getName();
71-
final String value = ij1Helper.getMacroParameter(name);
72-
if (ColorTable.class.equals(type) || ItemVisibility.MESSAGE.equals(input.getVisibility())) {
73-
// resolve display messages and color tables. For the latter, a macro parameter
70+
final Class<?> type = input.getType();
71+
if (Button.class.equals(type) || ColorTable.class.equals(type) || ItemVisibility.MESSAGE.equals(input.getVisibility())) {
72+
// resolve buttons, display messages, and color tables. For the latter a parameter
7473
// value is provided but IJM cannot do anything with it. See #239 for details
7574
module.resolveInput(name);
7675
continue;
7776
}
78-
if (value == null) { // no macro parameter value provided
79-
if (Button.class.equals(type)) {
80-
module.resolveInput(name); // resolve buttons
81-
}
77+
final String value = ij1Helper.getMacroParameter(name);
78+
if (value == null) {
79+
// no macro parameter value provided
8280
continue;
8381
}
8482
if (!convertService.supports(value, type)) {

0 commit comments

Comments
 (0)