use of org.elixir_lang.mix.MissingSdk in project intellij-elixir by KronicDeth.
the class Annotator method doAnnotate.
@Nullable
@Override
public List<Issue> doAnnotate(PsiFile file) {
List<Issue> issueList;
try {
ProcessOutput processOutput = ExecUtil.execAndGetOutput(generalCommandLine(file));
Project project = file.getProject();
Module module = ModuleUtilCore.findModuleForPsiElement(file);
issueList = lineListToIssueList(processOutput.getStdoutLines(), project, module);
} catch (ExecutionException | MissingSdk executionException) {
issueList = emptyList();
}
return issueList;
}
use of org.elixir_lang.mix.MissingSdk in project intellij-elixir by KronicDeth.
the class Annotator method generalCommandLine.
@NotNull
private static GeneralCommandLine generalCommandLine(@NotNull String workingDirectory, @NotNull Project project, @Nullable Module module, @NotNull List<String> parameters) throws MissingSdk {
Sdk sdk;
if (module != null) {
sdk = mostSpecificSdk(module);
} else {
sdk = mostSpecificSdk(project);
}
if (sdk == null) {
throw new MissingSdk(project, module);
}
GeneralCommandLine commandLine = Mix.commandLine(emptyMap(), workingDirectory, sdk, emptyList(), emptyList());
commandLine.addParameters(parameters);
return commandLine;
}
Aggregations