public boolean isNestedFile(Project project, VirtualFile file) {
    if (!ProjectViewState.getInstance(project).getUseFileNestingRules()) return false;
    String fileName = file.getName();
    for (ProjectViewFileNestingService.NestingRule rule : getNestingRules()) {
      if (!StringUtil.endsWithIgnoreCase(fileName, rule.getChildFileSuffix())) continue;
      VirtualFile directory = file.getParent();
      if (directory == null || !directory.isDirectory()) return false;
      String parentName = StringUtil.trimEnd(fileName, rule.getChildFileSuffix()) + rule.getParentFileSuffix();
      if (directory.findChild(parentName) != null) return true;
    }
    return false;
  }
public boolean isNestedFile(Project project, VirtualFile file)