@Override
  public void selectIn(final SelectInContext context, final boolean requestFocus) {
    Project project = context.getProject();
    VirtualFile file = context.getVirtualFile();

    Module module;
    Facet<?> facet;
    if (file instanceof FacetAsVirtualFile) {
      facet = ((FacetAsVirtualFile)file).findFacet();
      module = facet == null? null : facet.getModule();
    }
    else {
      Module moduleByIml = FileTypeRegistry.getInstance().isFileOfType(file, ModuleFileType.INSTANCE) ? findModuleByModuleFile(project, file) : null;
      ProjectFileIndex fileIndex = ProjectRootManager.getInstance(project).getFileIndex();
      module = moduleByIml != null ? moduleByIml : fileIndex.getModuleForFile(file);
      facet = fileIndex.isInSourceContent(file) ? null : findFacet(project, file);
    }
    if (module != null || facet != null) {
      ApplicationManager.getApplication().invokeLater(() -> {
        if (facet != null) {
          ModulesConfigurator.showFacetSettingsDialog(facet, null);
        }
        else {
          ProjectSettingsService.getInstance(project).openModuleSettings(module);
        }
      });
      return;
    }

    OrderEntry orderEntry = LibraryUtil.findLibraryEntry(file, project);
    if (orderEntry != null) {
      ApplicationManager.getApplication().invokeLater(
        () -> ProjectSettingsService.getInstance(project).openLibraryOrSdkSettings(orderEntry));
    }
  }
@Override
  public void selectIn(final SelectInContext context, final boolean requestFocus)