use of com.virtuslab.gitmachete.frontend.file.grammar.MacheteGeneratedBranch in project git-machete-intellij-plugin by VirtusLab.
the class MacheteAnnotator method processMacheteGeneratedEntry.
@UIThreadUnsafe
private void processMacheteGeneratedEntry(MacheteGeneratedEntry macheteEntry, AnnotationHolder holder) {
MacheteGeneratedBranch branch = macheteEntry.getBranch();
PsiFile file = macheteEntry.getContainingFile();
val branchNames = MacheteFileUtils.getBranchNamesForPsiFile(file);
if (branchNames.isEmpty()) {
if (!cantGetBranchesMessageWasShown) {
UiThreadExecutionCompat.invokeLaterIfNeeded(NON_MODAL, () -> showCantGetBranchesMessage(file));
}
return;
}
cantGetBranchesMessageWasShown = false;
val processedBranchName = branch.getText();
if (!branchNames.contains(processedBranchName)) {
holder.newAnnotation(HighlightSeverity.ERROR, format(getString("string.GitMachete.MacheteAnnotator.cannot-find-local-branch-in-repo"), processedBranchName)).range(branch).create();
}
}
Aggregations