clarify parameter names

This commit is contained in:
Jonathan Shook 2024-01-18 00:23:09 -06:00
parent add366a73b
commit 76ab3672ac
3 changed files with 6 additions and 6 deletions

View File

@ -39,9 +39,9 @@ public class NBJavaCommandLoader {
}
}
public static NBInvokableCommand init(String cmdSelector, NBComponent parent, String cmdAlias, String ctxName) {
public static NBInvokableCommand init(String cmdSelector, NBComponent parent, String stepName, String ctxName) {
NBCommandInfo cmdInfo = getSelector(cmdSelector).getOne();
NBInvokableCommand command = cmdInfo.create(parent, cmdAlias, ctxName);
NBInvokableCommand command = cmdInfo.create(parent, cmdSelector, ctxName);
return command;
}

View File

@ -34,7 +34,7 @@ import java.util.Optional;
@Service(value = NBInvokableResolver.class, selector = "autojs")
public class NBAutoScriptResolver implements NBInvokableResolver {
@Override
public NBInvokableCommand resolve(Cmd cmd, NBBufferedContainer parent, String phaseName) {
public NBInvokableCommand resolve(Cmd cmd, NBBufferedContainer parent, String stepname) {
Optional<Content<?>> scriptfile = NBIO.local()
.searchPrefixes("scripts/auto")
@ -47,7 +47,7 @@ public class NBAutoScriptResolver implements NBInvokableResolver {
Map<String, CmdArg> newArgs = new LinkedHashMap<>(cmd.getArgs());
newArgs.put("path",new CmdArg(new CmdParam("name",s->s,false),"=",pathOf.toString()));
Cmd reformattedCmd = new Cmd("script", newArgs);
return new NBScriptedCommand(parent, phaseName, cmd.getTargetContext()).add(reformattedCmd);
return new NBScriptedCommand(parent, stepname, cmd.getTargetContext()).add(reformattedCmd);
} else {
return null;
}

View File

@ -25,10 +25,10 @@ import io.nosqlbench.nb.annotations.Service;
@Service(value = NBInvokableResolver.class, selector = "js")
public class NBScriptCommandResolver implements NBInvokableResolver {
@Override
public NBInvokableCommand resolve(Cmd cmd, NBBufferedContainer parent, String phaseName) {
public NBInvokableCommand resolve(Cmd cmd, NBBufferedContainer parent, String stepname) {
return switch (cmd.getCmdType()) {
case fragment, script->
new NBScriptedCommand(parent, phaseName, cmd.getTargetContext()).add(cmd);
new NBScriptedCommand(parent, stepname, cmd.getTargetContext()).add(cmd);
// case fragment ->
// new NBScriptedCommand(parent, phaseName, cmd.getTargetContext()).addScriptText(cmd.getArgValue("fragment"));
// case script ->