@Nullable
  private static IdeaPlugin findDescriptorFile(@NotNull Module module, @NotNull String filePath) {
    Ref<IdeaPlugin> ideaPlugin = Ref.create();
    processModuleSourceRoots(module, root -> {
      final VirtualFile candidate = root.findChild(filePath);
      if (candidate == null) return true;
      final PsiFile psiFile = PsiManager.getInstance(module.getProject()).findFile(candidate);
      if (DescriptorUtil.isPluginXml(psiFile)) {
        ideaPlugin.set(DescriptorUtil.getIdeaPlugin((XmlFile)psiFile));
        return false;
      }
      return true;
    });
    return ideaPlugin.get();
  }
@Nullable
  private static IdeaPlugin findDescriptorFile(@NotNull Module module, @NotNull String filePath)