ai.vespa.schemals.lsp.command.ExecuteCommand Maven / Gradle / Ivy
package ai.vespa.schemals.lsp.command;
import java.util.Optional;
import ai.vespa.schemals.context.EventExecuteCommandContext;
import ai.vespa.schemals.lsp.command.commandtypes.SchemaCommand;
/**
* Responsible for LSP workspace/executeCommand requests.
*/
public class ExecuteCommand {
public static Object executeCommand(EventExecuteCommandContext context) {
Optional command = CommandRegistry.getCommand(context.params);
if (command.isEmpty()) {
for (Object obj : context.params.getArguments()) {
context.logger.info(obj.getClass().toString() + " ||| " + obj.toString());
}
}
command.ifPresent(cmd -> cmd.execute(context));
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy