@Override
  public @NotNull List<@NotNull TextEditorHighlightingPass> instantiateMainPasses(@NotNull PsiFile psiFile,
                                                                                  @NotNull Document document,
                                                                                  @NotNull HighlightInfoProcessor highlightInfoProcessor) {
    ApplicationManager.getApplication().assertIsNonDispatchThread();
    Set<TextEditorHighlightingPass> ids = new HashSet<>();
    PassConfig[] frozenPassConfigs = freezeRegisteredPassFactories();
    for (int passId = 0; passId < frozenPassConfigs.length; passId++) {
      PassConfig passConfig = frozenPassConfigs[passId];
      if (passConfig == null) continue;
      TextEditorHighlightingPassFactory factory = passConfig.passFactory;
      if (factory instanceof MainHighlightingPassFactory) {
        TextEditorHighlightingPass pass = ((MainHighlightingPassFactory)factory).createMainHighlightingPass(psiFile, document, highlightInfoProcessor);
        if (pass != null) {
          ids.add(pass);
          pass.setId(passId);
        }
      }
    }
    return new ArrayList<>(ids);
  }
@Override
  public @NotNull List<@NotNull TextEditorHighlightingPass> instantiateMainPasses(@NotNull PsiFile psiFile,
                                                                                  @NotNull Document document,
                                                                                  @NotNull HighlightInfoProcessor highlightInfoProcessor)