public class ServerUtils
extends java.lang.Object
| Constructor and Description |
|---|
ServerUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<CompileCommand> |
getCompilationDatabase(java.io.File compileCommandsFile)
Parses the compile commands json to create the compilation database given the compile
commands json file.
|
static java.util.List<CompileCommand> |
getCompilationDatabase(java.io.File buildDirectory,
java.lang.String compileCommandsFilename)
Parses the compile commands json to create the compilation database.
|
static boolean |
isCodeModelValid(CodeModel codeModel)
Validates if the response to code model from Cmake server is valid
|
static boolean |
isComputedResultValid(ComputeResult computeResult)
Validates if the result of compute from Cmake server is valid
|
static boolean |
isConfigureResultValid(ConfigureResult configureResult)
Validates the given reponse to configure command from Cmake server
|
static boolean |
isHelloResultValid(HelloResult helloResult)
Validates the given hello result object.
|
@NonNull public static java.util.List<CompileCommand> getCompilationDatabase(@NonNull java.io.File buildDirectory, @NonNull java.lang.String compileCommandsFilename) throws java.io.IOException, com.google.gson.JsonSyntaxException
buildDirectory - - build directory where compileCommandsFilename is presentcompileCommandsFilename - - json file with compile commands info generated by Cmakejava.io.IOException - I/O failurecom.google.gson.JsonSyntaxException@NonNull public static java.util.List<CompileCommand> getCompilationDatabase(@NonNull java.io.File compileCommandsFile) throws java.io.IOException, com.google.gson.JsonSyntaxException
compileCommandsFile - - json file with compile commands info generated by Cmakejava.io.IOException - I/O failurecom.google.gson.JsonSyntaxExceptionpublic static boolean isHelloResultValid(HelloResult helloResult)
helloResult - - given hello result received from Cmake serverpublic static boolean isConfigureResultValid(ConfigureResult configureResult)
public static boolean isComputedResultValid(ComputeResult computeResult)
public static boolean isCodeModelValid(CodeModel codeModel)